Re: Same Batch file paused on some PC but not all
From: Lawrence (Lawrence_at_discussions.microsoft.com)
Date: 12/03/04
- Next message: Pegasus \(MVP\): "Re: Win 2K repair mess"
- Previous message: David Brugge: "Win 2K repair mess"
- In reply to: Pegasus \(MVP\): "Re: Same Batch file paused on some PC but not all"
- Next in thread: Pegasus \(MVP\): "Re: Same Batch file paused on some PC but not all"
- Reply: Pegasus \(MVP\): "Re: Same Batch file paused on some PC but not all"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 3 Dec 2004 01:47:02 -0800
It's not at the last line, and when running other batch files, even with one
as simple as :
copy path\file_a d:\detination_path
copy path\file_b d:\detination_path
copy path\file_c d:\detination_path
copy path\file_d d:\detination_path
copy path\file_e d:\detination_path
copy path\file_f d:\detination_path
copy path\file_g d:\detination_path
On some computers, sometimes (not always even on the same PC) need to press
a key to make the batch file goes on too.
Any idea ? or it's just a bug on the DOS prompt under Windows 2000 ?
"Pegasus (MVP)" wrote:
> Those PCs that require Enter to be pressed, which is the
> last line they execute?
>
> By the way, you can simplify your code by making use
> of some advanced Win2000/XP batch file commands.
> Your lines
>
> C:\AppDir\W2KSP4_src\W2KSP4_tw.exe
> if %errorlevel%==1 goto file_match
> if NOT %errorlevel%==1 goto file_not_match
> :file_not_match
> echo File not match, W2KSP4_tw.exe
>
> are equivalent to
>
> C:\AppDir\W2KSP4_src\W2KSP4_tw.exe || goto file_match
> echo File not match, W2KSP4_tw.exe
>
> || means: execute this if the errorlevel was > 0
> && means: execute this if the errorlevel was = 0
>
> "Lawrence" <Lawrence@discussions.microsoft.com> wrote in message
> news:B25F11D4-622D-4F1F-870C-DD8BD79C72CF@microsoft.com...
> > The batch file is : (the content in between the dotted line)
> >
> > --------------------------------------------------------------------------
> -----------------
> > SET ND=\\Network_File_Server\NETLOGON
> > SET FD=\\Network_File_Server\FILEDIST
> >
> > C:\AppDir\W2KSP4_src\LOGTIME.exe %wsid% > C:\AppDir\W2KSP4_src\W2KSP4_log
> >
> > cscript C:\AppDir\W2KSP4_src\delete_file.vbs
> >
> > echo Check window current verion
> > C:\AppDir\W2KSP4_src\LOGTIME.exe "Check window current version" >>
> > C:\AppDir\W2KSP4_src\W2KSP4_log
> > regedit /e C:\AppDir\W2KSP4_src\w2ksp4_winver.txt
> > "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion"
> >
> > TYPE C:\AppDir\W2KSP4_src\w2ksp4_winver.txt | FIND /c "Service Pack 4" >
> NUL
> > IF NOT %ERRORLEVEL%==1 goto no_need_to_install_SP4
> >
> > IF NOT EXIST C:\AppDir\W2KSP4_src\compfile.vbs goto file_not_match
> > IF NOT EXIST C:\AppDir\W2KSP4_src\LOGTIME.exe goto file_not_match
> > IF NOT EXIST C:\AppDir\W2KSP4_src\delete_file.vbs goto file_not_match
> > IF NOT EXIST C:\AppDir\W2KSP4_src\kill.vbs goto file_not_match
> > IF NOT EXIST C:\AppDir\W2KSP4_src\Prompt1.exe goto file_not_match
> > IF NOT EXIST C:\AppDir\W2KSP4_src\Prompt2.exe goto file_not_match
> >
> > cscript C:\AppDir\W2KSP4_src\compfile.vbs
> > %FD%\package\W2KSP4\W2KSP4_src\W2KSP4_tw.exe
> > C:\AppDir\W2KSP4_src\W2KSP4_tw.exe
> > if %errorlevel%==1 goto file_match
> > if NOT %errorlevel%==1 goto file_not_match
> >
> > :file_not_match
> > echo File not match, W2KSP4_tw.exe
> > C:\AppDir\W2KSP4_src\LOGTIME.exe "File not match W2KSP4_tw.exe" >>
> > C:\AppDir\W2KSP4_src\W2KSP4_log
> > Type C:\AppDir\W2KSP4_src\W2KSP4_log >> %FD%\cfg\%wsid%\W2KSP4_log
> > C:\AppDir\W2KSP4_src\Prompt2.exe
> > goto END
> > :end
> >
> > :file_match
> > Start C:\AppDir\W2KSP4_src\Prompt1.exe
> > echo File match, W2KSP4_tw.exe
> > C:\AppDir\W2KSP4_src\LOGTIME.exe "File match W2KSP4_tw.exe" >>
> > C:\AppDir\W2KSP4_src\W2KSP4_log
> > :end
> >
> > echo Execute Install W2KSP4_tw.exe - Start
> > C:\AppDir\W2KSP4_src\LOGTIME.exe "Start install W2KSP4_tw.exe" >>
> > C:\AppDir\W2KSP4_src\W2KSP4_log
> > REM C:\AppDir\W2KSP4_src\w2ksp4_tw.exe -u -o -z -q
> > REM NO BACKUP
> > C:\AppDir\W2KSP4_src\w2ksp4_tw.exe -u -o -z -q -n
> > echo Execute Install W2KSP4_tw.exe - Finish
> > C:\AppDir\W2KSP4_src\LOGTIME.exe "Finish install W2KSP4_tw.exe" >>
> > C:\AppDir\W2KSP4_src\W2KSP4_log
> >
> > cscript C:\AppDir\W2KSP4_src\file_exist.vbs
> > if %errorlevel%==1 goto install_success
> > if NOT %errorlevel%==1 goto install_fail
> >
> > :install_fail
> > C:\AppDir\W2KSP4_src\LOGTIME.exe W2KSP4_fail >>
> > C:\AppDir\W2KSP4_src\W2KSP4_log
> > Type C:\AppDir\W2KSP4_src\W2KSP4_log >> %FD%\cfg\%wsid%\W2KSP4_log
> >
> > cscript C:\AppDir\W2KSP4_src\kill.vbs Prompt1.exe
> > C:\AppDir\W2KSP4_src\Prompt2.exe
> > goto CHKPT2
> > :end
> >
> > :install_success
> > C:\AppDir\W2KSP4_src\delete_file.vbs
> > TYPE C:\AppDir\W2KSP4_src\W2KSP4_log >> %FD%\cfg\%wsid%\W2KSP4_log
> > goto CHKPT1
> > :end
> >
> > :no_need_to_install_SP4
> > IF NOT EXIST %FD%\cfg\%wsid%\W2KSP4_log
> > C:\AppDir\W2KSP4_src\LOGTIME.exe "Already W2KSP4" >>
> > C:\AppDir\W2KSP4_src\W2KSP4_log
> > IF EXIST %FD%\cfg\%wsid%\W2KSP4_log TYPE %FD%\cfg\%wsid%\W2KSP4_log >
> > C:\AppDir\W2KSP4_src\W2KSP4_log
> > C:\AppDir\W2KSP4_src\LOGTIME.exe W2KSP4_success >>
> > C:\AppDir\W2KSP4_src\W2KSP4_log
> > Type C:\AppDir\W2KSP4_src\W2KSP4_log >> %FD%\cfg\%wsid%\W2KSP4
> > goto CHKPT2
> > :end
> >
> > :CHKPT1
> > echo end
> > C:\AppDir\reboot.exe
> > :end
> >
> > :CHKPT2
> > echo end
> > goto END
> > :end
> > --------------------------------------------------------------------------
> -----------------
> >
> >
> > "Pegasus (MVP)" wrote:
> >
> > >
> > > "Lawrence" <Lawrence@discussions.microsoft.com> wrote in message
> > > news:4A88F751-F48D-4BE8-ABCF-688A45092C48@microsoft.com...
> > > > Running the same DOS batch file on many PC, most PC will run till the
> end,
> > > > but few need press {Enter} key to make the batch file goes on.
> > > >
> > > > Any clue what's the cause and how to fix it ?
> > > >
> > > > Thank you.
> > >
> > > - What does the batch file look like?
> > > - What is the operating system of your PCs?
> > >
> > >
> > >
>
>
>
- Next message: Pegasus \(MVP\): "Re: Win 2K repair mess"
- Previous message: David Brugge: "Win 2K repair mess"
- In reply to: Pegasus \(MVP\): "Re: Same Batch file paused on some PC but not all"
- Next in thread: Pegasus \(MVP\): "Re: Same Batch file paused on some PC but not all"
- Reply: Pegasus \(MVP\): "Re: Same Batch file paused on some PC but not all"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|