Wagner Posted May 23, 2006 Share Posted May 23, 2006 I have a AutoIT script and when I put this in the LogonScript (Active Directory GPO) it work fine, but if I put the same script in the Startup Script section in the GPO it doesn't work. The error is "Unable to execute the external program. Access denied". This is the Script: RunAsSet("AdminUser","DOMAIN","password") $Command = @ComSpec & ' /c Copy \\FileServer\SharedFolder\FileToCopy.tmp ' & @WindowsDir RunWait($Command,@WindowsDir,@SW_HIDE) RunAsSet() I'm tried with another locations (C: Drive, etc.) and the error is the same. Anyone can help me? Regards Wagner Link to comment Share on other sites More sharing options...
neogia Posted May 23, 2006 Share Posted May 23, 2006 Try this, DOS commands work with just Run() or RunWait(): RunAsSet("AdminUser","DOMAIN","password") $Command = 'Copy \\FileServer\SharedFolder\FileToCopy.tmp ' & @WindowsDir RunWait($Command,@WindowsDir,@SW_HIDE) RunAsSet() [u]My UDFs[/u]Coroutine Multithreading UDF LibraryStringRegExp GuideRandom EncryptorArrayToDisplayString"The Brain, expecting disaster, fails to find the obvious solution." -- neogia Link to comment Share on other sites More sharing options...
jpm Posted May 24, 2006 Share Posted May 24, 2006 I have a AutoIT script and when I put this in the LogonScript (Active Directory GPO) it work fine, but if I put the same script in the Startup Script section in the GPO it doesn't work. The error is "Unable to execute the external program. Access denied".This is the Script:RunAsSet("AdminUser","DOMAIN","password")$Command = @ComSpec & ' /c Copy \\FileServer\SharedFolder\FileToCopy.tmp ' & @WindowsDirRunWait($Command,@WindowsDir,@SW_HIDE)RunAsSet()I'm tried with another locations (C: Drive, etc.) and the error is the same.Anyone can help me?RegardsWagner don't you have another line in the error message box ?I don't think the neogia answer can help. Link to comment Share on other sites More sharing options...
Wagner Posted May 24, 2006 Author Share Posted May 24, 2006 don't you have another line in the error message box ?I don't think the neogia answer can help.JPM, before the message appear the command, all in one window, but anything else.Do you know something about this problem?Thanks Link to comment Share on other sites More sharing options...
Wagner Posted May 26, 2006 Author Share Posted May 26, 2006 JPM, before the message appear the command, all in one window, but anything else.Do you know something about this problem?ThanksFor the records, this is because in the startup script the active directory don't need the autentication, and if someone use the autentication (with RunAsSet) an error will be generated. Link to comment Share on other sites More sharing options...
jpm Posted May 29, 2006 Share Posted May 29, 2006 For the records, this is because in the startup script the active directory don't need the autentication, and if someone use the autentication (with RunAsSet) an error will be generated.so you get an extra line in the messagebox about authenfication failure. Right?Just make a copy of the message box and post it.Thanks 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