Page 1 of 1

!!!Question about BAT file

Posted: 20 Apr 2010 05:26
by Pifukas
I have a problem with batch file. If I open CMD (start-run-cmd) and paste there this:
cd /d C:\Progra~1\samba
cygsetup.cmd
start_daemons.cmd
EVERYTHING works perfect,

but if I make BAT file with:
cd /d C:\Progra~1\samba
cygsetup.cmd
start_daemons.cmd
in it, it won't start the program for me...

It's very important to me if someone could help me to make it work for me. I need it make BAT file and to put it to START-PROGRAMS-START UP, to make it start automaticaly when computer starts.I use windows XP.

Re: Question about BAT file

Posted: 20 Apr 2010 09:45
by jeb
Hi Pifukas,

try to add some "pause" commands for debugging, best on each line.

Code: Select all

echo #1
pause
cd /d C:\Progra~1\samba
echo #2
pause
cygsetup.cmd
echo #2
pause
start_daemons.cmd
echo #2
pause


And if you want to use other batch/cmd files in a batch, try to call them like

Code: Select all

cd /d C:\Progra~1\samba
call cygsetup.cmd
call start_daemons.cmd


jeb

Re: Question about BAT file

Posted: 20 Apr 2010 23:58
by Pifukas
Thank you. I'll try it today and let you know if it works.

Re: Question about BAT file

Posted: 21 Apr 2010 06:50
by Pifukas
It's still not working :evil: :twisted: :twisted: :twisted: :twisted: Can anyone make such a file for me and upload it to USENDIT or someone else. Please. Thank you

Re: !!!Question about BAT file

Posted: 22 Apr 2010 10:53
by jeb
Hi,

perhaps you should write, what part is not working.

What do you see with the debug version?

jeb

Re: !!!Question about BAT file

Posted: 03 May 2010 09:12
by avery_larry
You have to call the .cmd files, as mentioned. Otherwise my personal guess is that something in those other .cmd files isn't returning control back to the original script. Put in the echo commands and pause commands with the call commands and see where it stops working.