Running a .bat file without window

T

Tyler Durden

Is possible to run a .bat file on Windows XP without showing its window?

Thanks to everyone!
 
S

Shenan Stanley

Tyler said:
Is possible to run a .bat file on Windows XP without showing its window?

cmdow.exe

However - it would likely be discovered by your AV software and quarantined.
 
P

Pegasus \(MVP\)

Tyler Durden said:
Is possible to run a .bat file on Windows XP without showing its window?

Thanks to everyone!

You can use the "Start" command to minimize the window that
the batch file runs in. This makes it less obtrusive but it's not
exactly invisible.

Perhaps you tell us what exactly you're trying to achieve. There
are some methods that will make a process completely invisible.
 
T

Tyler Durden

Thanks to both of you. I would like to make the process transparent to the
user, without his attention or a undesired interaction. Already know of the
cmdow.exe, but the possibility of it being detected as malware is a risk
that we cannot afford.
 
P

Pegasus \(MVP\)

Sorry, you did not really say anything about the process
you have in mind, only that you wish to hide it.
 
P

Pegasus \(MVP\)

You could launch your own service through the netlogon script,
using srvany and instsrv. It's a bit more work than inserting a
couple of copy commands into the startup script but it will
certainly make the process invisible. See here for details:
http://support.microsoft.com/kb/137890
 
I

Ian D

Tyler Durden said:
Pegasus, it is a simple and pure bat file that copy some files.
I have .bat files that I use for copying specific files.
For these .bat files I made shortcuts with icons on
the desktop, with Properties>Run set to minimized.
When a .bat runs, a button appears briefly on the
task bar, but no command window appears on the
desktop.
 
R

Ramesh, MS-MVP

You may use a VBScript to run the batch file:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthrun.asp

intWindowStyle
Optional. Integer value indicating the appearance of the program's window.
Note that not all programs make use of this information.


intWindowStyle Description
0 Hides the window and activates another window



See:




--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
The Winhelponline Blog: http://www.winhelponline.com/blog
Windows® Troubleshooting: http://www.winhelponline.com
 
R

Ramesh, MS-MVP

You may use a VBScript to run the batch file:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthrun.asp

intWindowStyle
Optional. Integer value indicating the appearance of the program's window.
Note that not all programs make use of this information.


intWindowStyle Description
0 Hides the window and activates another window



See:

Silent .bat/.cmd file (no window) - microsoft.public.windowsxp.general |
Google Groups:
http://groups.google.com/group/microsoft.public.windowsxp.general/msg/d281575031842fed


--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
The Winhelponline Blog: http://www.winhelponline.com/blog
Windows® Troubleshooting: http://www.winhelponline.com
 
T

Tyler Durden

Thank you Ramesh, but on vbs by default the system asks for permition to run
it, with a Security Warning. The best solution until now is the cmdow, that
could be detected as malware.


Ramesh said:
You may use a VBScript to run the batch file:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthrun.asp

intWindowStyle
Optional. Integer value indicating the appearance of the program's window.
Note that not all programs make use of this information.


intWindowStyle Description
0 Hides the window and activates another window



See:




--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
The Winhelponline Blog: http://www.winhelponline.com/blog
Windows® Troubleshooting: http://www.winhelponline.com


Tyler Durden said:
Is possible to run a .bat file on Windows XP without showing its window?

Thanks to everyone!
 
R

Ramesh, MS-MVP

I don't get the warning screen. Are you running the .VBS from a network
share, per chance?

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
The Winhelponline Blog: http://www.winhelponline.com/blog
Windows® Troubleshooting: http://www.winhelponline.com


Tyler Durden said:
Thank you Ramesh, but on vbs by default the system asks for permition to
run it, with a Security Warning. The best solution until now is the cmdow,
that could be detected as malware.


Ramesh said:
You may use a VBScript to run the batch file:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/wsmthrun.asp

intWindowStyle
Optional. Integer value indicating the appearance of the program's
window.
Note that not all programs make use of this information.


intWindowStyle Description
0 Hides the window and activates another window



See:




--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
The Winhelponline Blog: http://www.winhelponline.com/blog
Windows® Troubleshooting: http://www.winhelponline.com


Tyler Durden said:
Is possible to run a .bat file on Windows XP without showing its window?

Thanks to everyone!
 
T

Tyler Durden

Worked just fine, thanks again to all of you. I hope this issue helps
someone else too.
 
B

blad3runn69

Cool stuff, thank you kindly for the info ju.c, and thank you to the good
people @ ntwind. You are right ju.c it is a very neat solution, muchly
appreciated. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top