emgenet Posted August 4, 2006 Posted August 4, 2006 Hello, I have a pbm with the RunAsSet Command. This is my script : Sleep (1000) RunAsSet ("administrateur", "domain", "password") Run ("c:\commun.bat") Sleep (1000) and this is the error when I do a Go (F5). >AU3Check Ended. >Running: (3.1.1.0):C:\Program Files\AutoIt3\autoit3.exe "P:\AutoIt\Ocs_Service.au3" P:\AutoIt\Ocs_Service.au3 (8) : ==> Unable to execute the external program.: Run ("c:\commun.bat") Le nom de répertoire est incorrect. If I rem the RunAsSet the script run ok. Could you help me thanks PS : excuse my english, but it's not my language.
MrChris Posted August 5, 2006 Posted August 5, 2006 Try using RunWait(@ComSpec & " /c " & "c:\commun.bat" MrChris
Danny35d Posted August 5, 2006 Posted August 5, 2006 (edited) emgenet welcome to AutoIt==> Unable to execute the external programI seen that message before. The way I fixed was by adding the Working directory.Ex:Run ("c:\commun.bat", @TempDir) Edited August 5, 2006 by Danny35d AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
emgenet Posted August 5, 2006 Author Posted August 5, 2006 Apparently it's OK with the Working directory. Thanks.
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