View Single Post
Old 31st January 2016, 02:30   #793  |  Link
slavanap
Registered User
 
slavanap's Avatar
 
Join Date: May 2011
Location: Moscow, Russia
Posts: 124
Quote:
Originally Posted by r0lZ View Post
OK. Anyway, currently, the BlockSleep solution doesn't work. I can't launch the exes with arguments. It seems that there is a bug. Therefore I will not change the power plan stuff yet. And probably, later, I'll add BlockSpeed as an alternative solution, but I'll keep the Power Plans too.
Oh, excuse me, I had to include usage example. First of all, first argument for blocksleep must me a full path for executable, and you can't execute arbitrary batch command with it, but if you run cmd.exe with /C argument, then you can.
Here's a batch file example with switch whether use blocksleep or not:
Code:
set command=^
dir "c:\Program Files" ^| ^
more

for %%i in (cmd.exe) do set "cmd=%%~$PATH:i"
echo %cmd%
set use_blocksleep=1
if %use_blocksleep%==0 %command%
if %use_blocksleep%==1 blocksleep.exe %cmd% /C "%command%"
note this part: ^| -- you need to escape | signs, or any other signs (< -- ^<, etc.) that could be interpreted as i/o redirection.

And I found one minor bug in blocksleep, as it always complaning to GetProcessExitCode. Here's a fix:
binary
source
virus total report
and again this Qihoo-360 antivirus detects it as a virus for whatever reason... It detected virus for previous executable but later its result was fixed. Let's see how long it'll take to fix result for this 1 byte different version.
slavanap is offline