Siginet Posted July 7, 2006 Share Posted July 7, 2006 (edited) cmdhide.exe v1.3 This small tool is useful for hiding ugly cmd windows.It might not be quite as effective as cmdow.exe but cmdow.exe is now triggered by antivirus programs as a virus. cmdow.exe is not a virus... but since the AV makers decided to destroy cmdow.exe I came up with this alternative.It works a little diffrently than cmdow. Here is how you use it:Most people will want to place the cmdhide.exe file in the system32 directory so they don't have to specify the path to cmdhide.exe in their batch files.There are 2 ways to use it. 1. Hide one Batch FileLet's say you want to hide only one batch file. The batch file you want to hide is the batch you are going to start. In this case you would want to call cmdhide.exe with the title of the batch window. So somewhere in your batch you need to make a Title for the batch window like this:Title MyBatchWindow So now your Window Title is "MyBatchWindow"Now in your batch you will want to call cmdhide.exe with the window title like this:Title MyBatchWindowcmdhide /name:MyBatchWindow *Make sure you put your window title between quotes if it has spaces in it.Now when the batch starts you will see the cmd window for a second then it will dissapear. 2. Hide batches called from other scriptsThis is my favorite and will probably be the most used because it never flashes the batch window at all. It is hidden from the get go. Also it is very simple to do.From within your main script if you are gonna call any batch windows you want to hide all you have to do is call cmdhide.exe with the path to the batch you want to hide.Example:cmdhide "X:\path\to\mybatch.bat"v1.31. Bug fixed when run without path.v1.21. Fixed bug where Environment Variables were not parsed.2. Fixed bug where if path was not given the batch was not run.v1.11. Fixed bug where if the path is not given an error would occur.2. If file does not exist an error would occur... now there will be no indication at all. Edited July 12, 2006 by Siginet Link to comment Share on other sites More sharing options...
XPero Posted July 7, 2006 Share Posted July 7, 2006 This will come in handy Good job Link to comment Share on other sites More sharing options...
LLXX Posted July 8, 2006 Share Posted July 8, 2006 Expect this to also be detected as a virus soon... Link to comment Share on other sites More sharing options...
jaws75 Posted July 8, 2006 Share Posted July 8, 2006 Looks good but I had a problem using it.It uses full paths only likecmdhide C:\batch.batwhen trying to call a batch from in the same directory likecmdhide batch.batit gave this error. Link to comment Share on other sites More sharing options...
Siginet Posted July 8, 2006 Author Share Posted July 8, 2006 Thanks for reporting that. I have fixed it now. I also fixed the instructions on how to use it within your batch file. I forgot to mention you needed to use cmdhide /name:"MyWindowTitle" Link to comment Share on other sites More sharing options...
jaws75 Posted July 8, 2006 Share Posted July 8, 2006 (edited) No more error message but the batch file is not called.and another "bug".I can't use environmental variables like %systemdrive% either.So the path to the batch must be an absolute path.Unfortunately this will not work in unattended situations where drive letters are variable like in a RunOnceEx file.Is it possible to add these features?thanks again. Edited July 8, 2006 by jaws75 Link to comment Share on other sites More sharing options...
Siginet Posted July 8, 2006 Author Share Posted July 8, 2006 No more error message but the batch file is not called.and another "bug".I can't use environmental variables like %systemdrive% either.So the path to the batch must be an absolute path.Unfortunately this will not work in unattended situations where drive letters are variable like in a RunOnceEx file.Is it possible to add these features?thanks again.Yes I will fix these issues as well.Are you sure the batch is not called? What are the exact ways you are testing it?Thanks for the reports! It helps a lot when people actually reply and help out.I will be back on monday and I will fix this issue. Link to comment Share on other sites More sharing options...
jaws75 Posted July 8, 2006 Share Posted July 8, 2006 Positive it is not called.The batch file I am calling will create a log file and delete a file.Without a path it does not work.With a path it does work.calling fromcmdhide tocall.batpausetocall.batdel /q todelete.txt>>c:\test.log echo it worksCreate a todelete.txt file and run the top batch file. It won't work.Add a path to the tocall.bat and it works.Thanks Link to comment Share on other sites More sharing options...
pmshah Posted July 9, 2006 Share Posted July 9, 2006 (edited) There has been application called run.exe available for a long time from makers of cathy.exe to run applications/ batch files in the background without any window being created. Edited July 9, 2006 by pmshah Link to comment Share on other sites More sharing options...
Siginet Posted July 10, 2006 Author Share Posted July 10, 2006 No more error message but the batch file is not called.and another "bug".I can't use environmental variables like %systemdrive% either.So the path to the batch must be an absolute path.Unfortunately this will not work in unattended situations where drive letters are variable like in a RunOnceEx file.Is it possible to add these features?thanks again.EnvVars fixed. Batch not running when no path is given fixed.Thx! Link to comment Share on other sites More sharing options...
ripken204 Posted July 10, 2006 Share Posted July 10, 2006 thx so much for this Siginet. i love how the window is completely hidden, this kinda p***ed me off with cmdow.exe Link to comment Share on other sites More sharing options...
jaclaz Posted July 10, 2006 Share Posted July 10, 2006 There has been application called run.exe available for a long time from makers of cathy.exe to run applications/ batch files in the background without any window being created.Just for the record:Actually, "run.exe" has nothing to do with cathy.exe, , it is part of the cygwin utilities:http://cygutils.fruitbat.org/run/index.htmlIt's use is advocated in an article related to cathycmd.exe, though :http://www.virtualplastic.org/html/alt_find.htmlCathy homepage:http://www.mtg.sk/rva/jaclaz Link to comment Share on other sites More sharing options...
JRosenfeld Posted July 10, 2006 Share Posted July 10, 2006 Nice, but I just told NAV to ignore CMDOW Link to comment Share on other sites More sharing options...
jaws75 Posted July 11, 2006 Share Posted July 11, 2006 (edited) Thanks for the update I will test it tomorrow.:update:I tested it.The env variables work now. Awsome!I get a different error when calling without a path. seen below.Siginet how are you calling a batch without a path to make it work?Did you try it the same as me? Edited July 11, 2006 by jaws75 Link to comment Share on other sites More sharing options...
Siginet Posted July 12, 2006 Author Share Posted July 12, 2006 I'll fix it tonight. lol **** bugs! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now