?
Solved

VBS script stopped working

Posted on 2012-03-09
2
Medium Priority
?
759 Views
Last Modified: 2012-06-27
I have a vbs script to copy the security event log so that I can back it up. I got the code from MS and it has been working for months, but last night it stopped. The code is:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate,(Backup,Security)}!\\" & _
        strComputer & "\root\cimv2")

Set colLogFiles = objWMIService.ExecQuery _
    ("Select * from Win32_NTEventLogFile where LogFileName='Security'")

For Each objLogfile in colLogFiles
    errBackupLog = objLogFile.BackupEventLog("c:\scripts\security.evt")
Next


When I run the script manually, I get the following error (on a command line):

C:\scripts\SecLogBackup.vbs(9, 1) (null): Cannot start a new logon session with an ID that is already in use

I suspect that a windows update changed some security permissions. Is there a way to make it work again without removing recent updates?

Thanks in advance
0
Comment
Question by:fisher_king
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 2000 total points
ID: 37703852
http://forums.iis.net/t/1168512.aspx seems to indicate that it's a conflict with KB980436.  Do you have that installed? Can you remove it and reboot, if so?
0
 

Author Closing Comment

by:fisher_king
ID: 37704282
It turns out that sharepoint and wsus weren't working either (even though all of the services were running). I removed the update and rebooted and everything appears to be working properly again. I don't understand why I started having problems last night when the update was installed in 2010. But thanks for the help.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I work for a company that primarily works with small businesses as their outsourced IT vendor. As such the majority of these customers utilize some version of Small Business Server. Due to the economics of running a small business, many of these cus…
If you are a user of the discontinued Microsoft Office Accounting 2008 (MSOA) and have to move to a new computer running Windows 8, you will be unhappy to discover that it won't install.  In particular, Microsoft SQL Server 2005 Express Edition (SSE…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question