Hi I\'m attempting to create a Message box with a \"DELAY\" button If the user does not press the Delay button the script will launch a batch file (or command)
So it
Save this as a .bat file:
@if (@CodeSection == @Batch) @then
@echo off
CScript //nologo //E:JScript "%~F0"
if %errorlevel% equ -1 (
echo The user NOT confirmed, proceed to auto-destruction!
) else (
echo Continue normally...
)
pause
goto :EOF
@end
WScript.Quit(WScript.CreateObject("WScript.Shell").Popup(
"This program will proceed to auto-destruction\nunless you press OK in 10 seconds",
10,"Popup Title",48))
The 10 is the number of seconds, the 48 the type of icon shown (an exclamation mark in this case), but you may modify it as described here.