jacky_ckw Posted January 5, 2005 Share Posted January 5, 2005 hi,was searching and found this topic but i still cant get my program to install...i have this line in my scriptrunwait("z:\viewer5\setup.exe")got an error: unable to execute the external program.the system cannot find the path specified.anyone able to help?thanks New to script...But getting the hang of it. Link to comment Share on other sites More sharing options...
CyberSlug Posted January 5, 2005 Share Posted January 5, 2005 I've not had any trouble running from network drives.... Does "z:\viewer5\setup.exe" work if you try it form the Start > Run dialog?I recommend trying the latest AutoIt beta http://www.autoitscript.com/autoit3/files/beta/autoit/Also try the commandsMsgBox(0, "z: mapping is", DriveMapGet("z:"))andFileExists ( "z:\viewer5\setup.exe" ) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Doxie Posted January 5, 2005 Share Posted January 5, 2005 Working directory Were ever i lay my script is my home... Link to comment Share on other sites More sharing options...
jacky_ckw Posted January 5, 2005 Author Share Posted January 5, 2005 I've not had any trouble running from network drives.... Does "z:\viewer5\setup.exe" work if you try it form the Start > Run dialog?I recommend trying the latest AutoIt beta http://www.autoitscript.com/autoit3/files/beta/autoit/Also try the commandsMsgBox(0, "z: mapping is", DriveMapGet("z:"))andFileExists ( "z:\viewer5\setup.exe" ) <{POST_SNAPBACK}>yes it does run from the start, rundid included a file check before executing, did not copy and paste from my script, just based on memory its something like tat...---if fileexists ("z:\viewer5\setup.exe") thenrunwait("z:\viewer5\setup.exe")else exit---if there is any error on my script here i have to copy and paste the original code that i typed... New to script...But getting the hang of it. Link to comment Share on other sites More sharing options...
jacky_ckw Posted January 5, 2005 Author Share Posted January 5, 2005 Working directory<{POST_SNAPBACK}>emm... i dont get u... New to script...But getting the hang of it. Link to comment Share on other sites More sharing options...
Chris_1013 Posted January 5, 2005 Share Posted January 5, 2005 I think you need to post the actual script for us to double check. The example you gave should work fine if the FileExists is working. Link to comment Share on other sites More sharing options...
SlimShady Posted January 5, 2005 Share Posted January 5, 2005 Tip:Open the help file once in a while. It contains syntax for all the functions.With examples.The working directory is a parameter you can choose to use for the Run/RunWait function. Link to comment Share on other sites More sharing options...
jacky_ckw Posted January 5, 2005 Author Share Posted January 5, 2005 Tip:Open the help file once in a while. It contains syntax for all the functions.With examples.The working directory is a parameter you can choose to use for the Run/RunWait function.<{POST_SNAPBACK}>i use the help file everytime cos im still learning from there! i will post my script here when i get back to office tomorrow Chris_1013 New to script...But getting the hang of it. Link to comment Share on other sites More sharing options...
jacky_ckw Posted January 6, 2005 Author Share Posted January 6, 2005 here is my source code... #comments-start setup Viewer 5 #comments-end AutoItSetOption("TrayIconHide", 1) $var = DriveStatus( "z:\" ) MsgBox(0,"Status", "Map drive as Z: status is " & $var) If $var = "INVALID" Then Exit If FileExists("z:\Viewer5\setup.exe") Then RunWait(@ComSpec & " /c " &"z:\Viewer5\setup.exe", "") MsgBox(0, "Restart", "Before launching the installed application, please restart your computer after installation", 6) Else MsgBox(0,"Error", "Setup.exe does not exist in Z:") EndIf New to script...But getting the hang of it. Link to comment Share on other sites More sharing options...
therks Posted January 6, 2005 Share Posted January 6, 2005 (edited) Since the file you're trying to execute is an .exe, you don't need to go through ComSpec. Try using this instead: RunWait("z:\Viewer5\setup.exe") It's also possible that the Working Directory you were specifying (the second parameter, you had an empty string) was part of the problem. So you could also try this: RunWait("z:\Viewer5\setup.exe", "z:\Viewer5\") *Edit: Hey, I'm an advanced member now! Woot! Edited January 6, 2005 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
jacky_ckw Posted January 6, 2005 Author Share Posted January 6, 2005 Since the file you're trying to execute is an .exe, you don't need to go through ComSpec.Try using this instead:RunWait("z:\Viewer5\setup.exe")It's also possible that the Working Directory you were specifying (the second parameter, you had an empty string) was part of the problem. So you could also try this:RunWait("z:\Viewer5\setup.exe", "z:\Viewer5\")*Edit: Hey, I'm an advanced member now! Woot!<{POST_SNAPBACK}>hi advance member Saunders,i tried to use yourRunWait("z:\Viewer5\setup.exe", "z:\Viewer5\")but still cannot...i keep having this error: unable to execute the external program, the system cannot find the path specified.thanks anyway... any other methods? New to script...But getting the hang of it. Link to comment Share on other sites More sharing options...
CyberSlug Posted January 6, 2005 Share Posted January 6, 2005 Hmm, I stumbled upon this thread: http://www.autoitscript.com/forum/index.ph...wtopic=2635&hl=I wonder if this a Windows problem or an AutoIt problem (or both)....I wonder if it matters how the drive is mapped? Do you use Novell, or Active Directory, or other?By the way, does RunWait support UNC paths like \\server\share\file.exe ? Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
jacky_ckw Posted January 7, 2005 Author Share Posted January 7, 2005 Hmm, I stumbled upon this thread: http://www.autoitscript.com/forum/index.ph...wtopic=2635&hl=hey CyberSlug,that is what happended to me! let me go thru tat thread and see what i can find there, he is having the same problem as me. New to script...But getting the hang of it. Link to comment Share on other sites More sharing options...
jacky_ckw Posted January 7, 2005 Author Share Posted January 7, 2005 darn! my bloody script worked on W2K but not on WinXP just like what the other guys are having problems with. so that means that there is nothing wrong with my script, just that somehow it didnt work on WinXP. well, i think we can only leave it to the next version of autoit which might be able to deal with this. New to script...But getting the hang of it. 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