Re: Same Batch file paused on some PC but not all
From: Pegasus \(MVP\) (I.can_at_fly.com)
Date: 12/02/04
- Next message: Pegasus \(MVP\): "Re: problem w/ cold boot"
- Previous message: David H. Lipman: "Re: Veritas 9.1 can't schedule jobs after full restore of server"
- In reply to: Lawrence: "Re: Same Batch file paused on some PC but not all"
- Next in thread: Lawrence: "Re: Same Batch file paused on some PC but not all"
- Reply: Lawrence: "Re: Same Batch file paused on some PC but not all"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 2 Dec 2004 22:33:18 +1100
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: problem w/ cold boot"
- Previous message: David H. Lipman: "Re: Veritas 9.1 can't schedule jobs after full restore of server"
- In reply to: Lawrence: "Re: Same Batch file paused on some PC but not all"
- Next in thread: Lawrence: "Re: Same Batch file paused on some PC but not all"
- Reply: Lawrence: "Re: Same Batch file paused on some PC but not all"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|