Solved

VBS script stopped working

Posted on 2012-03-09
2
748 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
2 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I've often see, or have been asked, the question about the difference between the Exchange 2010 SP1 version, available as part of Small Business Server (SBS) 2011, and the “normal” Exchange 2010 SP1 Standard. The answer to the question is relativ…
A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

861 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