!!!Question about BAT file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Pifukas
Posts: 3
Joined: 20 Apr 2010 05:24

!!!Question about BAT file

#1 Post by Pifukas » 20 Apr 2010 05:26

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.
Last edited by Pifukas on 21 Apr 2010 07:26, edited 1 time in total.

jeb
Expert
Posts: 1055
Joined: 30 Aug 2007 08:05
Location: Germany, Bochum

Re: Question about BAT file

#2 Post by jeb » 20 Apr 2010 09:45

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

Pifukas
Posts: 3
Joined: 20 Apr 2010 05:24

Re: Question about BAT file

#3 Post by Pifukas » 20 Apr 2010 23:58

Thank you. I'll try it today and let you know if it works.

Pifukas
Posts: 3
Joined: 20 Apr 2010 05:24

Re: Question about BAT file

#4 Post by Pifukas » 21 Apr 2010 06:50

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

jeb
Expert
Posts: 1055
Joined: 30 Aug 2007 08:05
Location: Germany, Bochum

Re: !!!Question about BAT file

#5 Post by jeb » 22 Apr 2010 10:53

Hi,

perhaps you should write, what part is not working.

What do you see with the debug version?

jeb

avery_larry
Expert
Posts: 391
Joined: 19 Mar 2009 08:47
Location: Iowa

Re: !!!Question about BAT file

#6 Post by avery_larry » 03 May 2010 09:12

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.

Post Reply