question about running a program with command-line options
Posted: 18 May 2011 22:06
I recently started trying scripting and made several toolbar buttons, e.g. 7-zip extract and archive, rename by search and replace, and using Hitman Pro to scan the current path for malware, etc. I encountered a difficulty, however to run programs with command-line options, e.g. in the case of Hitman Pro, I'm aware of a working alternative: put it in my catalog with the following location:
"C:\Users\Wedung\AppData\Local\SurfRight\HitmanPro35.exe" /scanonly /ews
this works perfectly. However, I want to add a right-click script to the button I just mentioned in order to do a quick scan (using the option /quick instead of /ews). I tried many forms but none worked:
::open "C:\Users\Wedung\AppData\Local\SurfRight\HitmanPro35.exe" "/scanonly" "/quick" (error shows "Division by zero, what does that mean??")
::open "C:\Users\Wedung\AppData\Local\SurfRight\HitmanPro35.exe" "/scanonly /quick" (program runs but only one file is scanned, so sth is wrong)
I know this is rather specific, but I guess my problem is independent of this particular program.
The left-click script of the button is the following and works OK
::open "C:\Users\Wedung\AppData\Local\SurfRight\HitmanPro35.exe" "<curpath>\";
But when dealing with /scanonly /quick, the scanner does not work properly. So in general, do you see what my problem is here? It's much simpler to use the catalog item without scripts, in which case the multiple arguments work well, but when I try scripts, it does not work. Please help!
Thanks you very much.
"C:\Users\Wedung\AppData\Local\SurfRight\HitmanPro35.exe" /scanonly /ews
this works perfectly. However, I want to add a right-click script to the button I just mentioned in order to do a quick scan (using the option /quick instead of /ews). I tried many forms but none worked:
::open "C:\Users\Wedung\AppData\Local\SurfRight\HitmanPro35.exe" "/scanonly" "/quick" (error shows "Division by zero, what does that mean??")
::open "C:\Users\Wedung\AppData\Local\SurfRight\HitmanPro35.exe" "/scanonly /quick" (program runs but only one file is scanned, so sth is wrong)
I know this is rather specific, but I guess my problem is independent of this particular program.
The left-click script of the button is the following and works OK
::open "C:\Users\Wedung\AppData\Local\SurfRight\HitmanPro35.exe" "<curpath>\";
But when dealing with /scanonly /quick, the scanner does not work properly. So in general, do you see what my problem is here? It's much simpler to use the catalog item without scripts, in which case the multiple arguments work well, but when I try scripts, it does not work. Please help!
Thanks you very much.