is there a way to stop the popping up of the md5.exe tool while it generates the hash for a file

StackOverflow https://stackoverflow.com/questions/18101441

  •  23-06-2022
  •  | 
  •  

문제

i have written a program in vbscript for which i have used md5.exe to generate hash. since there are many files to which the hash has to be generated, the md5 hash repeatedly generates hash for each file one after the other. but while this process is in progress, i can see it popping out on the screen as it generates the hashes ( it does not pop out the hashes, the tool itself pops out on the screen repeatedly). i want to do something such that it stops popping out yet generate the hash for all the files. please help guys!

도움이 되었습니까?

해결책

Generally, when running a command, youj can supress its output by directing it to a file, then deleting the file

md5.exe blahblah >null the >null being the critical part. Note however, that null doesn't directly it to a magical blackhole. It creates a file named null and prints the output there

This would supress the output. IF you posted some code, I could have told you how to do that there. but if you are running it as a shell exec, this should work

You can use the run method to supress the window.

Set WshShell = CreateObject("WScript.Shell")
cmd= "C:\Users\Administrator\desktop\experimenting\md5.exe" 

'OR whatvere your whole command is

 cmdRun = WshShell.Run(cmd,0,true);

Answer from here Want to hide command prompt window in using WshShell.Exec method (Upvote the guy if you find it useful)

Please note that you have tro use the output file to read. You cannot read the output from the shell anymore.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top