September 12, 200916 yr Sintaxisfor print time add "in %%d"If you run msgbox from other program, use only one percent sign %d (like printf())"<Message>" "<Title>" "<Flag #1-5>" "<seconds>"for non timeout use in seconds "0" Flags:You may combine following box styles:0 = OK1 = OK + Cancel2 = Abort + Retry + Igonore3 = Yes + No + Cancel4 = Yes + No5 = Retry + Cancel6 = Cancel + Retry + ContinueIcon:16 Error32 Question48 Exclamation64 InformationHere are the errorlevels returned:0 Timed out1 OK2 Cancel3 Abort4 Retry5 Ignore6 Yes7 No11 ContinueYou can also use %ERRORLEVEL% as environment variable, i.e.if "%ERRORLEVEL%"=="5" goto :ignoreif "%ERRORLEVEL%"=="4" goto :retryif "%ERRORLEVEL%"=="3" goto :abort
January 28, 201214 yr Anyone got something like this that works on Win7 x64?Here's a simple one line command that can be used inside a batch file. No problems with Win7 x64.echo msgbox"my important message",64,"Some Import Title"> a.vbs & cscript a.vbs //T:5 & del a.vbsSet your timeout by changing the //T:5 valueCoding References: MsgBox: http://www.w3schools.com/vbscript/func_msgbox.asp CScript: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/cscript_overview.mspx?mfr=true
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now