njscorpion Posted September 11, 2009 Share Posted September 11, 2009 (edited) hi guys i downloaded a small utility from softpedia.com its a command line application that can be used to generate md5 and sha1 hash when i try executing the program lets say: hash.exe --md5 --recursive c:\testfolder>Hash.txt it works great but when i try to replicate the same in auto it i don't get any output only a command windows flash for a second and closes, here is the script i wrote, plz have a look: $folderpath=@WorkingDir&"\RootFolder" $Exe='"'&@WorkingDir&'\hash.exe"'&' --md5 --recursive '&'"'&$folderpath&'"'&'>c:\test.txt' MsgBox(0,"CMD 2 EXE : ",$Exe) RunWait($Exe,"",@SW_MAXIMIZE) ;OR ShellExecuteWait('"'&@WorkingDir&'\hash.exe"',' --md5 --recursive '&'"'&$folderpath&'"'&'>c:\test.txt',"","",@SW_MAXIMIZE) the app download location (Just in case): "h**p://www.softpedia.com/get/System/File-Management/Hash-mayakron.shtml" what am i doing wrong? Edited September 11, 2009 by njscorpion Link to comment Share on other sites More sharing options...
Skruge Posted September 11, 2009 Share Posted September 11, 2009 what am i doing wrong?Output redirection with > is handled by CMD.exe. You can either use StdoutRead to receive the output directly, or let CMD.exe execute your command. RunWait(@ComSpec & " /c " & $Exe, "", @SW_MAXIMIZE) [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
njscorpion Posted September 11, 2009 Author Share Posted September 11, 2009 (edited) thanks i will check it out and let u know, if it works or i again mess up --Edit--thanks it worked Edited September 11, 2009 by njscorpion 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