We help IT Professionals succeed at work.

# need batch file for windows command prompt to open, copy a file start a program and then close

on
i need a batch file that i can run that will do the following

copy an   .ini file
copy an .exe file
run the .exe file
close the batch window, while leaving the program running.

what i have so far is

xcopy P:\suite\new\ca.exe "c:\program files\ca" /Y
xcopy P:\suite\new\ca.ini c:\ca.ini /Y

"c:\program files\ca\ca.exe"

eof

this works fine except that it leaves the command window open until i exit the ca.exe program.

this is a problem because sometimes in moving in and out of forms within the program, teh command window ends up on top of the pile. and not consistantly.

so what i was hoping to do was to be able to start the program within the command window and then just exit the command window.  leaving the program running.

Comment
Watch Question

## View Solution Only

Commented:
Try

start "c:\program files\ca\ca.exe"

Commented:
i just get a command window.

i take the start back out   it executes the program and leaves the window open...

i have other programs that explicity use the /w command for the program to wait until the executed program is complete before continuing....

this is the oppisite of that.

i WANT it to continue on and end.
Commented:
If you just get another command box instead of your program started with
start "C:\path\to\program.exe"

there is anything wrong with your exe. Is it a real exe/binary or something else like another script?
In batch using start is the prefered method to execute a binary exe-application.

Commented:
ok,  it really doesnt like spaces.

rem Using old dos names (from "dir /X")