Shyke Posted November 30, 2005 Share Posted November 30, 2005 I was wondering how to run a *.exe file with args, could anyone help me out? Link to comment Share on other sites More sharing options...
BigDod Posted November 30, 2005 Share Posted November 30, 2005 I was wondering how to run a *.exe file with args, could anyone help me out?Try run("prog.exe /arg") Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Valuater Posted November 30, 2005 Share Posted November 30, 2005 if you look at a "link" from... say Mcaffee right click > properties > you can see how they do it 8) Link to comment Share on other sites More sharing options...
Shyke Posted November 30, 2005 Author Share Posted November 30, 2005 Try run("prog.exe /arg") Hmmm.... I have: Func Unzip() ; Usage: "unzip file.zip -d c:\where\to\unzip\" Run("unzip.exe /unzip " & $path & "test.zip -d " & $path) EndFunc Why won't it unzip the zip file? Link to comment Share on other sites More sharing options...
Valuater Posted November 30, 2005 Share Posted November 30, 2005 i noticed you use $path twice... does it... or does it not include the actal file name 8) Link to comment Share on other sites More sharing options...
Shyke Posted November 30, 2005 Author Share Posted November 30, 2005 I want it to unzip the "test.zip" file that is at the $path location to the $path. Link to comment Share on other sites More sharing options...
SpookMeister Posted November 30, 2005 Share Posted November 30, 2005 You might need to include the full path to unzip.exe near the begining. Func Unzip() ; Usage: "unzip file.zip -d c:\where\to\unzip\" Run("C:\path\to\unzip.exe " & $path & "test.zip -d " & $path) EndFunc [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Shyke Posted November 30, 2005 Author Share Posted November 30, 2005 I want it to unzip the "test.zip" file that is at the $path location to the $path.The path to unzip.exe is the currect directory. Link to comment Share on other sites More sharing options...
SpookMeister Posted November 30, 2005 Share Posted November 30, 2005 That could easily be a false assumption... try hard coding it to see if it makes a difference. It shouldn't do any harm. [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Shyke Posted November 30, 2005 Author Share Posted November 30, 2005 Didn't change anything. Link to comment Share on other sites More sharing options...
Valuater Posted November 30, 2005 Share Posted November 30, 2005 i couldn't find your exact line... but this may helphttp://www.mkssoftware.com/docs/man1/unzip.1.asp'and Spook is probably correct also8) Link to comment Share on other sites More sharing options...
SpookMeister Posted November 30, 2005 Share Posted November 30, 2005 (edited) For testing, make a variable that holds the entire string exactly the way you want it to be, then do a MsgBox to display it so you can verify that all the variables were passed and formatted the way you want. Something like this: Func Unzip() ; Usage: "unzip file.zip -d c:\where\to\unzip\" $var = "C:\path\to\unzip.exe " & $path & "test.zip -d " & $path MsgBox(0,"variable",$var) Run($var) EndFunc Also consider just typing exactly what you are expecting into a CMD window to verify that unzip.exe doesn't have a problem with your syntax. Edited November 30, 2005 by SpookMeister [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Rece Posted November 30, 2005 Share Posted November 30, 2005 What is $path? Do you have "\" at the end of it before "test.zip"? Link to comment Share on other sites More sharing options...
Shyke Posted November 30, 2005 Author Share Posted November 30, 2005 $path is the directory of the location to extract the file to and where it was downloaded to, it will vary from computer to computer. Everything checks out properly when I test it. Maybe it is the unzip.exe? Anyone have one (a *.exe that unzips files) that works as a standalone? Link to comment Share on other sites More sharing options...
SpookMeister Posted November 30, 2005 Share Posted November 30, 2005 maybe:http://www.softpedia.com/get/Compression-t...mand-Line.shtml [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
Shyke Posted December 1, 2005 Author Share Posted December 1, 2005 Alright, I am using palc and I am getting this:Unable to execute the external program.: Run(@TempDir & '\unzip.exe /-p"' & $Path & '" "' & $Path & 'test.zip"', @SW_HIDE) The directory name is invalid. Link to comment Share on other sites More sharing options...
Valuater Posted December 1, 2005 Share Posted December 1, 2005 (edited) so the unzip.exe is located in C:\Documents and settings\current user\local settings\temp thats where the exe is????? thats where @TempDir is looking 8) Edited December 1, 2005 by Valuater Link to comment Share on other sites More sharing options...
JSThePatriot Posted December 1, 2005 Share Posted December 1, 2005 As stated before does $Path include a trailing "\"? If it doesnt then try the following. Run(@TempDir & '\unzip.exe /-p"' & $Path & '" "' & $Path & '\test.zip"', @SW_HIDE) If it does have the trailing backslash. Then try and take it out of the first $path. I think that would be the way to go. Hope this helps, JS AutoIt Links File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out. ComputerGetInfo UDF's Updated! 11-23-2006 External Links Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more) 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