Jump to content

Recommended Posts

Posted

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 :)

Posted

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 :)

don't you have another line in the error message box ?

I don't think the neogia answer can help.

Posted

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

Posted

JPM, before the message appear the command, all in one window, but anything else.

Do you know something about this problem?

Thanks

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.
Posted

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 :)

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...