How to freeze a batch file or do not allow the users to close the batch file ?
CMDOW is a Commandline utility that allows manipulation of open windows. This is a standalone executable for which no installation is required.
CMDOW [window | /T] [/B] [/F] [/P]
CMDOW /TH | /TV | /MA | /CW | /UW | /AT | /FS | /WM
CMDOW window {[/ACT] [/INA] [/ENA] [/DIS] [/VIS] [/HID] [/MIN] [/MAX] [/RES]
[/TOP] [/NOT] [/REN caption] [/MOV left top] [/SIZ width height] [/CLS]
[/END]}
CMDOW /RUN [state] file [args]
window List specified window (if omitted, all windows are listed).
/T List windows only shown on the taskbar.
/B List windows using bare format (no heading information).
/F List windows showing full information (don't truncate any fields).
/P List windows showing position and size (left, top, width and height).
/TH Tile windows horizontally. /TV Tile windows vertically.
/MA Minimize all windows. /CW Cascade windows.
/UW Undo tile/minimize/cascade. /AT Intelligent [Alt]-[Tab]
/FS Switch to full screen mode. /WM Switch to window mode.
/ACT Activate specified window. /INA Inactivate specified window.
/ENA Enable specified window. /DIS Disable specified window.
/VIS Unhide specified window. /HID Hide specified window.
/MIN Minimize specified window. /MAX Maximize specified window.
/RES Restore specified window. /REN Rename specified window.
/TOP Make window always on top. /NOT Make window not always on top.
/MOV Move specified window. /SIZ Resize specified window.
/CLS Close specified window. /END Kill process linked to window.
/RUN Executes or opens specified file using associated application.
state Initial show state of window (/MIN, /MAX or /HID). Default is normal.
args Optional commandline arguments passed to launched application.
Specify a window by its caption (case insensitive) or handle in hex format.
The At symbol '@' may be used to refer to this window. For more help on any
parameter use CMDOW /? <parameter>. Eg CMDOW /? /RUN or CMDOW /? window.
Comments
CMDOW Use
This can be used but note that many anti-virus software will deteact it as a virus, used by hackers but can be verified by file hash signature (MD5 or SHA) maches. Would run /MIN but not sure what is needed for your specific Batch file.
Could run:
cmdow /run /hid my_batchfile cmd1 "cmd 2"
To run all hidden check this out: http://www.commandline.co.uk/chp/
Nice posts, thanks both of
Nice posts, thanks both of you for these commands.
May not be a recommended tool ...
Not sure many people would be comfortable to deploy scripts using this tool considering ThreatExpert summary of it as below:
http://www.threatexpert.com/files/cmdow.exe.html
Better use HIDCON
There is a small tool called HIDCON.exe that can run any batch-command in a hidden window.
The size is only 2KB and the only parameter in "-nw" means "no wait". As a default (without -nw) the program will wait for the end of the subprocess and forwards its errorcode.
How to freeze a batch file...
There are some very great sources here and thank you for being so kind to post them here. So we can read them and give our opinion on subject.
Can't changing the priority
Can't changing the priority of the file solve the problem?
Thanks, I think than i'll
Thanks, I think than i'll never find this.
Well worth the read. Thanks
Well worth the read. Thanks for sharing this information. I got a chance to know about the commandline utility CMDOW.
Facebook button under the "share" dropdown
You can find a facebook button under the "share" dropdown menu in the upper right corner of the page.
Feel free to share any content you find interesting and useful!
Thanks!
Cheryl
Endpoint Management,
Endpoint Virtualization
Community Manager
www.twitter.com/EMnV_symc
Need Altiris help? IRC chat #Altiris
Would you like to reply?
Login or Register to post your comment.