Sign in to follow this  
Followers 0
njscorpion

problem executing 3rd party command utility

3 posts in this topic

#1 ·  Posted (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 by njscorpion

Share this post


Link to post
Share on other sites



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]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

thanks i will check it out and let u know, if it works or i again mess up Posted Image

--Edit--

thanks it worked

Edited by njscorpion

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0