Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
This is really puzzling me. i have writen a .bat that xcopys a file. then runs a program. it then waits till i exit that program. then re copys a file. this is all good and works fine. here it is :-
CLS
@ECHO OFF
TITLE PROCOMM PLUS UPDATE - DONT CLOSE
ECHO.******************************************
ECHO.* PLEASE WAIT WHILE PROCOMM UPDATES.... *
ECHO.******************************************
rem from mainserver to pc
Xcopy \\Mainserver\Bureau\Masterprowin\prowin\*.key C:\prowin /D /C /Q /H /R /Y
Xcopy \\Mainserver\Bureau\Masterprowin\prowin\ASPECT C:\prowin\ASPECT /D /C /Q /H /R /Y
Xcopy \\Mainserver\Bureau\Masterprowin\prowin\dial\*.dir C:\prowin\dial\*.dir /C /Q /H /R /Y
ECHO.*****************************************
ECHO.* PLEASE DO NOT CLOSE THIS WINDOW. *
ECHO.* THIS WINDOW WILL SHUT AUTOMATICLLY *
ECHO.* WHEN PROCOMM IS CLOSED. *
ECHO.*****************************************
rem prowin run
start /MAX /wait C:\prowin\PW.exe
ECHO.******************************************
ECHO.* PROCOMM IS NOW UPDATING THE MAINSERVER *
ECHO.* WITH ANY CHANGES YOU HAVE MADE. *
ECHO.* THIS WINDOW WILL CLOSE WHEN COMPLETE *
ECHO.******************************************
rem from pc to mainserver
Xcopy C:\prowin\*.key \\Mainserver\Bureau\Masterprowin\prowin /D /C /Q /H /R /Y
Xcopy C:\prowin\ASPECT \\Mainserver\Bureau\Masterprowin\prowin\ASPECT /D /C /Q /H /R /Y
Xcopy C:\prowin\dial\*.dir \\Mainserver\Bureau\Masterprowin\prowin\dial\*.dir /C /Q /H /R /Y
exit
rem finished
i use start /max /wait "C:\prowin\pw.exe" to launch my program. this works fine and launches my program.i then went to do exacly the same but for another program (pw4.exe)
all i did was change the command line so it launches pw4.exe.i used start /max /wait "c:\program files\procomm plus\programs\pw4.exe" (the location of pw4)
the batch file runs ok at first it copys the files ok. but when it comes to launching pw4.exe all it dose is open another cmd window with the dir line C:\batch witch is were i launch the batch file from.
why dose it do this? how can i change it so it will launch pw4.exe. this has confussed me as the pervouse batch flie i wrote worked fine. all i have done is change the dir route. i have verified twice the dir is correct to launce pw4.exe
how can i fix this?
i hve tryed all the options given to me in start/? but no joy. i hve dubble checked that there arnt any silly mistakes.
HELP!!!
regards
colin

Try to use the short name format for the path leading to pw4.exe, so instead of
Start /Max /Wait "c:\program files\procomm plus\programs\pw4.exe"
type
Start /Max /Wait C:\Progra~1\procom~1\programs\pw4.exe
where what I showed has to be checked by repeating the Dir /X command step by step through the path, e.g.
Dir /X C:
Dir /X "C:\Program Files"(Dir /X returns the short name format)
This way omits the " embedding the path and sometime removes the origin of mismatch.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |