windows - Error: 0x80041001 when running VBScript to enumerate software -


when ran vbscript on windows8.1 machine, got following error. same code ran on other machines.

error: 0x80041001 code: 80041001 source: (null) error line 'for each ...' 

code:

'obtain collection of windows installer packages  set msiapps = getobject("winmgmts:{impersonationlevel=impersonate}!\\" & computer & "\root\cimv2").execquery("select * win32_product name 'cisco%'")  'enumerate names of packages in collection  each app in msiapps       version =  app.version     installdir = app.installlocation   next 

in theory, starting , stopping wmi service:

wmi runs service display name "windows management instrumentation" , service name "winmgmt". wmi runs automatically @ system startup under localsystem account. if wmi not running, automatically starts when first management application or script requests connection wmi namespace.

looks winmgmt service has stopped working reason. @ command prompt (run administrator), enter net start winmgmt , watch output message.

configure service run automatically services.msc or follow e.g. chang yin's answer wmi corrupt - how reinstall/repair?.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -