Closing cmd windows by .bat files

  • Thread starter Ben-Zion Joselson
  • Start date
B

Ben-Zion Joselson

Due to startup conflicts in Windows 2000 SP4 between
NIS2004 Pro and other applications, I replaced in
HKLM...run key a few .exe values with .bat values, e.g.:

"C:\Program Files\Common Files\Symantec Shared\ccApp.exe"

was replaced by:

"C:\Program Files\Common Files\Symantec Shared\ccApp.bat"

and ccApp.bat consists of:

sleep 10
"C:\Program Files\Common Files\Symantec Shared\ccApp.exe"

[sleep.exe taken from Windows NT4.0 Wrkstn ResKit Tools].

Now things look fine but the cmd windows are opened by
the .bat files and I have to close them manually.

What command line should I add at the end of each .bat
file to make the cmd windows automatically close after
the .bat is executed?
I prefer to stay within the Windows 2000 Command
Reference, if possible.
 
D

Dave Patrick

exit

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect


:
| Due to startup conflicts in Windows 2000 SP4 between
| NIS2004 Pro and other applications, I replaced in
| HKLM...run key a few .exe values with .bat values, e.g.:
|
| "C:\Program Files\Common Files\Symantec Shared\ccApp.exe"
|
| was replaced by:
|
| "C:\Program Files\Common Files\Symantec Shared\ccApp.bat"
|
| and ccApp.bat consists of:
|
| sleep 10
| "C:\Program Files\Common Files\Symantec Shared\ccApp.exe"
|
| [sleep.exe taken from Windows NT4.0 Wrkstn ResKit Tools].
|
| Now things look fine but the cmd windows are opened by
| the .bat files and I have to close them manually.
|
| What command line should I add at the end of each .bat
| file to make the cmd windows automatically close after
| the .bat is executed?
| I prefer to stay within the Windows 2000 Command
| Reference, if possible.
 
M

Mark V

In said:
Due to startup conflicts in Windows 2000 SP4 between
NIS2004 Pro and other applications, I replaced in
HKLM...run key a few .exe values with .bat values, e.g.:

"C:\Program Files\Common Files\Symantec Shared\ccApp.exe"

was replaced by:

"C:\Program Files\Common Files\Symantec Shared\ccApp.bat"

and ccApp.bat consists of:

sleep 10
"C:\Program Files\Common Files\Symantec Shared\ccApp.exe"

[sleep.exe taken from Windows NT4.0 Wrkstn ResKit Tools].

Now things look fine but the cmd windows are opened by
the .bat files and I have to close them manually.

What command line should I add at the end of each .bat
file to make the cmd windows automatically close after
the .bat is executed?
I prefer to stay within the Windows 2000 Command
Reference, if possible.

In some cases you may need to START the application, then EXIT.

START "" /MIN "C:\Program Files\Common Files\Symantec Shared\ccApp.exe"
EXIT
 
B

Ben-Zion Joselson

Yes, you are right, Mark:
Only after I modified each .bat file to include:

START "" /MIN

before the application, and:

exit

at the end, did the procedure succeed and each cmd window
closes automatically.

Exit alone is not enough.
-----Original Message-----
In microsoft.public.win2000.registry Ben-Zion Joselson wrote:
Due to startup conflicts in Windows 2000 SP4 between
NIS2004 Pro and other applications, I replaced in
HKLM...run key a few .exe values with .bat values, e.g.:

"C:\Program Files\Common Files\Symantec Shared\ccApp.exe"

was replaced by:

"C:\Program Files\Common Files\Symantec Shared\ccApp.bat"

and ccApp.bat consists of:

sleep 10
"C:\Program Files\Common Files\Symantec Shared\ccApp.exe"

[sleep.exe taken from Windows NT4.0 Wrkstn ResKit Tools].

Now things look fine but the cmd windows are opened by
the .bat files and I have to close them manually.

What command line should I add at the end of each .bat
file to make the cmd windows automatically close after
the .bat is executed?
I prefer to stay within the Windows 2000 Command
Reference, if possible.

In some cases you may need to START the application, then EXIT.

START "" /MIN "C:\Program Files\Common Files\Symantec Shared\ccApp.exe"
EXIT

.
 

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