McBrollocks Posted October 13, 2009 Share Posted October 13, 2009 (edited) Hi, in the code below, the 1st RunAsWait works fine (running a registry key that is included in the AutoIt executable) But the second RunAsWait string just refuses to work, regardless of what I do with the logon_flag (I've tried all 4 values). Also, if you run the string in $KasperskyNAStr in a command prompt of OurDomain\admin, it executes, so the path and authentication are OK. $WSUSStr = "regedit /s " & $WD & "/south-workstations-wsus3-regedit4.reg" $KasperskyNAStr = '"\\server6.OurDomain.com\SHARE\Packages\NetAgent 6.0.1710\setup.exe " /S /v/qn' RunAsWait ( "administrator", @ComputerName, $adminpasswd, 1, $WSUSStr, $WD, @SW_HIDE ) RunAsWait ( "admin", "OurDomain", "OurDomainPassword", 4, $KasperskyNAStr, $WD, @SW_MINIMIZE ) Any ideas would be very welcome! Edited October 13, 2009 by McBrollocks Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 13, 2009 Share Posted October 13, 2009 Hi, in the code below, the 1st RunAsWait works fine (running a registry key that is included in the AutoIt executable)But the second RunAsWait string just refuses to work, regardless of what I do with the logon_flag (I've tried all 4 values). Also, if you run the string in $KasperskyNAStr in a command prompt of OurDomain\admin, it executes, so the path and authentication are OK. $WSUSStr = "regedit /s " & $WD & "/south-workstations-wsus3-regedit4.reg" $KasperskyNAStr = '"\\server6.OurDomain.com\SHARE\Packages\NetAgent 6.0.1710\setup.exe " /S /v/qn' RunAsWait ( "administrator", @ComputerName, $adminpasswd, 1, $WSUSStr, $WD, @SW_HIDE ) RunAsWait ( "admin", "OurDomain", "OurDomainPassword", 4, $KasperskyNAStr, $WD, @SW_MINIMIZE )Any ideas would be very welcome!Exactly how does it refuse to work? What are the failure indications, and what is the return value? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
McBrollocks Posted October 13, 2009 Author Share Posted October 13, 2009 Exactly how does it refuse to work? What are the failure indications, and what is the return value? The return value is 0 and there is no error of any kind. But the setup.exe process from the network share doesn't start Link to comment Share on other sites More sharing options...
idbirch Posted October 13, 2009 Share Posted October 13, 2009 On the machine which fails to run the 2nd RunAs, what happens if you run an Explorer instance with your Domain Admin account and then try accessing \\server6.OurDomain.com\SHARE\Packages\NetAgent 6.0.1710\? Is it actually reachable? Link to comment Share on other sites More sharing options...
McBrollocks Posted October 13, 2009 Author Share Posted October 13, 2009 On the machine which fails to run the 2nd RunAs, what happens if you run an Explorer instance with your Domain Admin account and then try accessing \\server6.OurDomain.com\SHARE\Packages\NetAgent 6.0.1710\? Is it actually reachable?Yes, it is reachable, not only for the Domain Admin account, but also for an ordinary user account which will be used to launch the exe I make with AutoIt. (The setup.exe should then run under a Domain Admin account) Link to comment Share on other sites More sharing options...
99ojo Posted October 13, 2009 Share Posted October 13, 2009 (edited) Yes, it is reachable, not only for the Domain Admin account, but also for an ordinary user account which will be used to launch the exe I make with AutoIt. (The setup.exe should then run under a Domain Admin account)Hi,try this:$KasperskyNAStr = '"\\server6.OurDomain.com\SHARE\Packages\NetAgent 6.0.1710\setup.exe" /S /v /qn'In your string is a blank behind the setup.exe and a blank missing between /v and /qn. It's just a guess......;-))Stefan Edited October 13, 2009 by 99ojo Link to comment Share on other sites More sharing options...
McBrollocks Posted October 14, 2009 Author Share Posted October 14, 2009 Hi,try this:$KasperskyNAStr = '"\\server6.OurDomain.com\SHARE\Packages\NetAgent 6.0.1710\setup.exe" /S /v /qn'In your string is a blank behind the setup.exe and a blank missing between /v and /qn. It's just a guess......;-))StefanHi, thanks for that. The /v/qn (with no space) is how it should be. The embarassing truth is that I missed something from the domain admin password in the script. It works fine now. Thanks for your suggestions. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now