Start Free Trial
Come for the solution, stay for everything else.
Start Free Trial
VBS script stopped working
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:" _
ity)}!\\" & _
strComputer & "\root\cimv2")
Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile where LogFileName='Security'")
For Each objLogfile in colLogFiles
errBackupLog = objLogFile.BackupEventLog(
When I run the script manually, I get the following error (on a command line):
s(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
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Log in or sign up to see answer
Become an EE member today
7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
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.
Your help has saved me hundreds of hours of internet surfing.
Plans and Pricing
Certified Expert Program
© 1996-2022 Experts Exchange, LLC. All rights reserved. Covered by US Patent