windows - GetObject() 429 Error When Using PSExec To Run WScript File On Virtual Machine -


i using following psexec command run wscript file on vmware player 7 virtual machine:

psexec \\devtest1 -u "administrator" -p "password" -h -i 1 -d c:\windows\system32\wscript.exe c:\scripts\closefiles.vbs 

this psexec command runs closefiles.vbs file on virtual machine devtest1. when run, closefiles.vbs file supposed detect open instance of excel 2007 and, if found, save every open workbook, close each workbook. when run locally on virtual machine, closefiles.vbs executes perfectly.

the problem arises when use psexec remote machine execute closefiles.vbs file on virtual machine. windows 7 has locked down uac remote access prevent loopback attacks. security reasons, must keep restriction in place (i know how change registry remove uac remote access restriction). means account can use run application on virtual machine, without using remote desktop client (which can't use in application), virtual machine's administrator account.

when run closefiles.vbs on virtual machine using psexec , virtual machine's administrator account , password remote machine gives me 429 error when encounters following statement:

set objxl = getobject( , "excel.application") 

this happens when psexec command run against virtual machine when user other administrator logged on @ virtual machine. when administrator logged on @ virtual machine, closefiles.vbs file executes perfectly. why closefiles.vbs work when virtual machine's administrator logged on , not when other virtual machine user logged on? how can fix problem? here's closefiles.vbs code:

option explicit '--------------------------------------------------  '*** dimension local variables *** dim objxl,  '*** enable error handling *** on error resume next  '*** set excel object variable *** set objxl = getobject( , "excel.application")  '*** trap error , shutdown computer if no open excel workbooks *** if err.number > 0 'no open excel workbooks  msgbox ("errorlevel ... " & err.number)  wscript.quit end if  '*** save data , close each open excel workbook *** each in objxl.workbooks 'close each open excel workbook  i.save  i.close next 

thanks in advance can provide.

harry, observation office not allowing 1 user manipulate user's processes appears problem. tried "decoupling" closefiles.vbs files uac permissions trying use task scheduler run closefiles.vbs using event trigger. didn't work because task scheduler integrated uac. i've opened new question on stackoverflow see if there approach saving open excel file in shutdown triggered power outage (the application of closefiles.vbs script) @

save & close open excel 2007 files automatically before shutdown due power loss


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -