-
Setting a .BAT file to 'Close on Exit'? API call?
I'm creating batch file on the fly, executing it in hidden mode with the shell
command, and then closing the file. The problem is how to close the .BAT
file after it's completed it's task. It appears the easiest way would be
to 'turn on' the close on exit option of a .BAT file after I've created the
file in my code. Does anyone know how to do this?
The only other option would be to use the TerminateProcess api call which
I've been having a heck of a time getting to work (Yes I've gone back through
what Bryan and Karl have posted - even referenced the 'API GUIDE' program).
Thanks,
Chris L.
-
Re: Setting a .BAT file to 'Close on Exit'? API call?
"Chris L." <clintvedt@ifcu.com> wrote in message
news:3b66db7a$1@news.devx.com...
>
> I'm creating batch file on the fly, executing it in hidden mode with the
shell
> command, and then closing the file. The problem is how to close the .BAT
> file after it's completed it's task. It appears the easiest way would be
> to 'turn on' the close on exit option of a .BAT file after I've created
the
> file in my code. Does anyone know how to do this?
try ending the BAT file with these 2 lines:
@Echo Off
CLS
Regardless of the 'Close on Exit' setting, if the DOS window is blank it
closes anyway
-
Re: Setting a .BAT file to 'Close on Exit'? API call?
"Chris L." <clintvedt@ifcu.com> wrote in message
news:3b66db7a$1@news.devx.com...
>
> I'm creating batch file on the fly, executing it in hidden mode with the
shell
> command, and then closing the file. The problem is how to close the .BAT
> file after it's completed it's task. It appears the easiest way would be
> to 'turn on' the close on exit option of a .BAT file after I've created
the
> file in my code. Does anyone know how to do this?
try ending the BAT file with these 2 lines:
@Echo Off
CLS
Regardless of the 'Close on Exit' setting, if the DOS window is blank it
closes anyway
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks