run a .bat file without see opening a window

Status
Not open for further replies.
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

I make "run as" of a .bat file that starts a .fwd file; it works well but
i have to close the window with the dos command (file .bat), i would like
this doesn't happen, is it possible?

Thank in advance
 

null

Distinguished
Apr 30, 2004
222
0
18,680
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

ezio wrote:

> I make "run as" of a .bat file that starts a .fwd file; it works well but
> i have to close the window with the dos command (file .bat), i would like
> this doesn't happen, is it possible?
>
> Thank in advance

I think I understand what you want. Would the command

Exit

at the end of the batch file do it?

--
The reader should exercise normal caution and backup the Registry and
data files regularly, and especially before making any changes to their
PC, as well as performing regular virus and spyware scans. I am not
liable for problems or mishaps that occur from the reader using advice
posted here. No warranty, express or implied, is given with the posting
of this message.
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.newusers (More info?)

"ezio" <ezio@discussions.microsoft.com>
wrote in news:15EBEFEB-473C-4CC4-A479-A7F78FD1F2BB@microsoft.com:
> I make "run as" of a .bat file that starts a .fwd file; it works well
> but i have to close the window with the dos command (file .bat), i
> would like this doesn't happen, is it possible?
>
> Thank in advance

Use "cmd /c <program>" to run your batch file. The shell will exit when
the program exits. You really don't explain well what is starting what,
so it might be that you need to use the start command, as in "[cmd /c]
start /b <program>". Run "cmd /?" and/or "start /?" to see how to use
them.

--
_________________________________________________________________
******** Post replies to newsgroup - Share with others ********
Email: lh_811newsATyahooDOTcom and append "=NEWS=" to Subject.
_________________________________________________________________
 
G

Guest

Guest
Running .BAT or .CMD files in invisible mode

Windows Script Host’s Run Method allows you run a program or script in invisible mode.

Sample Code

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Batch Files\syncfiles.bat" & Chr(34), 0
Set WshShell = Nothing

Copy the lines above to Notepad and save the file with .VBS extension. Edit the .BAT file name and path accordingly, and save the file. Double-click the .VBS file to run it.

http://www.winhelponline.com/blog/run-bat-files-invisibly-without-displaying-command-prompt/
 
Status
Not open for further replies.