Almost finished with my project again except for one thing... Code: echo :Messagebox>>%SystemDrive%\Trial\IR7\IR7.bat echo echo set args=WScript.Arguments ^>msgbox.vbs >>%SystemDrive%\Trial\IR7\IR7.bat echo echo wscript.quit MsgBox(Replace(Replace(args.item(1),"{cr}",vbNewLine,1,-1,1),"{qt}",Chr(34),1,-1,1),args.item(2),args.item(0)) ^>^>msgbox.vbs >>%SystemDrive%\Trial\IR7\IR7.bat echo msgbox.vbs "IR7" "Your 180 day free trial has ended, do you wish to install IR7 again?" 4 >>%SystemDrive%\Trial\IR7\IR7.bat echo IF %%ERRORLEVEL%% EQU 6 del /s /q msgbox.vbs ^>nul ^&^& call :ReinstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat echo IF %%ERRORLEVEL%% EQU 7 del /s /q msgbox.vbs ^>nul ^&^& call :UninstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat This .vbs code gives Yes/No message box then redirects to another function either reinstall/uninstall I would like it to give second msg box that says "One moment please while IR7 is reinstalling" if reinstall is pressed If uninstall is pressed I'd like to give message "IR7 has been successfully uninstalled" I saw somewhere where a msg box button opens up another message box Any ideas
rough copy i guess. Code: @ECHO OFF ECHO set args=WScript.Arguments >>msgbox.vbs ECHO.wscript.quit MsgBox(Replace(Replace(args.item(1),"{cr}",vbNewLine,1,-1,1),"{qt}",Chr(34),1,-1,1),args.item(2),args.item(0)) >>msgbox.vbs msgbox.vbs "IR7" "Your 180 day free trial has ended, do you wish to install IR7 again?" 4 IF %ERRORLEVEL% EQU 6 msgbox.vbs "IR7" "One moment please while IR7 is reinstalling..." 6 & GOTO :REINSTALL IF %ERRORLEVEL% EQU 7 GOTO :UNINSTALL :REINSTALL REM Reinstall process. :UNINSTALL REM Uninstall process. msgbox.vbs "IR7" "IR7 has been successfully uninstalled." 1 & PAUSE >NUL :EOF
Awesome Only, I wanted .vbs message box's for each yes/no option Remember, I was the one who found out how to run the "check" batch silent, so it won't just give message unless maybe we we're to write it to another batch with echo stuff Yea, I have been doing this stuff for too long (4 years) ...lol
Then please explain further what it is you are looking for. As the code ive posted goes, the yes/no buttons when pressed trigger another .vbs msg box with the text you requested.
Ok, so how do I incorporate this: Code: IF %%ERRORLEVEL%% EQU 6 msgbox.vbs "IR7" "One moment please while IR7 is reinstalling..." 6 & GOTO :ReinstallIR7 IF %%ERRORLEVEL%% EQU 7 GOTO :UninstallIR7 into this: Code: echo :Messagebox>>%SystemDrive%\Trial\IR7\IR7.bat echo echo set args=WScript.Arguments ^>msgbox.vbs >>%SystemDrive%\Trial\IR7\IR7.bat echo echo wscript.quit MsgBox(Replace(Replace(args.item(1),"{cr}",vbNewLine,1,-1,1),"{qt}",Chr(34),1,-1,1),args.item(2),args.item(0)) ^>^>msgbox.vbs >>%SystemDrive%\Trial\IR7\IR7.bat echo msgbox.vbs "IR7" "Your 180 day free trial has ended, do you wish to install IR7 again?" 4 >>%SystemDrive%\Trial\IR7\IR7.bat echo IF %%ERRORLEVEL%% EQU 6 del /s /q msgbox.vbs ^>nul ^&^& call :ReinstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat echo IF %%ERRORLEVEL%% EQU 7 del /s /q msgbox.vbs ^>nul ^&^& call :UninstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat Code: echo :UninstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat echo msgbox.vbs "IR7" "IR7 has been successfully uninstalled." 1 >NUL echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 0 /f ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /delete /tn "IR7" /f ^>NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /delete /tn "Hybrid2" /f ^>NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /delete /tn "Hybrid3" /f ^>NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /query ^| FINDSTR /I "IORRT" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo IF ERRORLEVEL 1 ( >>%SystemDrive%\Trial\IR7\IR7.bat echo GOTO TrialFolderDelete >>%SystemDrive%\Trial\IR7\IR7.bat echo ) ELSE ( >>%SystemDrive%\Trial\IR7\IR7.bat echo GOTO IR7FolderDelete >>%SystemDrive%\Trial\IR7\IR7.bat echo ) >>%SystemDrive%\Trial\IR7\IR7.bat echo :TrialFolderDelete>>%SystemDrive%\Trial\IR7\IR7.bat echo echo rd /s /q %SystemDrive%\Trial ^>NUL ^>^>%SystemDrive%\removeTrial.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo echo schtasks /delete /tn "removeTrial" /f ^>NUL ^>^>%SystemDrive%\removeTrial.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo echo del /F /Q %SystemDrive%\removeTrial.bat ^>nul ^>^>%SystemDrive%\removeTrial.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /create /tn "removeTrial" /tr "%SystemDrive%\removeTrial.bat" /sc onlogon /ru "" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /run /tn "removeTrial" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo GOTO :Exit >>%SystemDrive%\Trial\IR7\IR7.bat echo :IR7FolderDelete>>%SystemDrive%\Trial\IR7\IR7.bat echo echo rd /s /q %SystemDrive%\Trial\IR7 ^>NUL ^>^>%SystemDrive%\removeIR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo echo schtasks /delete /tn "removeIR7" /f ^>NUL ^>^>%SystemDrive%\removeIR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo echo del /F /Q %SystemDrive%\removeIR7.bat ^>nul ^>^>%SystemDrive%\removeIR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /create /tn "removeIR7" /tr "%SystemDrive%\removeIR7.bat" /sc onlogon /ru "" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /run /tn "removeIR7" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo GOTO :Exit >>%SystemDrive%\Trial\IR7\IR7.bat For the reinstall when windows closes that msg box will auto close But for the uninstall, I wonder how to do message but have the uninstall do it's thing Should I put it at end of both :TrialFolderDelete and :IR7FolderDelete functions and again how should I close it after uninstall Can I use an ping to give delay to read message The reinstall msg box I'll want to be there till it restarts... The uninstall can however, say uninstall before it actually uninstall and by the time the uninstall msg box closes it actually will be uninstalled
What? You would need to have the uninstall process be called as another command prompt as batch is a one line at a time kinda girl. taskkill /f /im wscript.exe kills the process running the msgbox.vbs and could be used to kill the msgbox. Ping could be used to delay anything. I will have to look into on getting my little code to work into that you've posted cause that batch output and multiple %%%% >>>> etc is just looney.
I think a Code: del /s /q msgbox.vbs will work cause the reinstall msgbox will close itself cause of restart so no problem there, just del /s /q msgbox.vbs for reinstall, then do "One moment please while IR7 is reinstalling..." For uninstall, we can put an Code: del /s /q msgbox.vbs So after 5 second ping we delete "IR7 has been successfully uninstalled." msgbox ...lol
I think this does it!? Code: echo :Messagebox>>%SystemDrive%\Trial\IR7\IR7.bat echo echo set args=WScript.Arguments ^>msgbox.vbs >>%SystemDrive%\Trial\IR7\IR7.bat echo echo wscript.quit MsgBox(Replace(Replace(args.item(1),"{cr}",vbNewLine,1,-1,1),"{qt}",Chr(34),1,-1,1),args.item(2),args.item(0)) ^>^>msgbox.vbs >>%SystemDrive%\Trial\IR7\IR7.bat echo msgbox.vbs "IR7" "Your 180 day free trial has ended, do you wish to install IR7 again?" 4 >>%SystemDrive%\Trial\IR7\IR7.bat echo IF %%ERRORLEVEL%% EQU 6 del /s /q msgbox.vbs ^&^& msgbox.vbs "IR7" "One moment please while IR7 is reinstalling..." 0 ^&^& call :ReinstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat echo IF %%ERRORLEVEL%% EQU 7 del /s /q msgbox.vbs ^>nul ^&^& call :UninstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat echo :UninstallIR7>>%SystemDrive%\Trial\IR7\IR7.bat echo msgbox.vbs "IR7" "IR7 has been successfully uninstalled..." 0 >>%SystemDrive%\Trial\IR7\IR7.bat echo REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" /v NotificationDisabled /t REG_DWORD /d 0 /f ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /delete /tn "IR7" /f ^>NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /delete /tn "Hybrid2" /f ^>NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /delete /tn "Hybrid3" /f ^>NUL 2>&1 >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /query ^| FINDSTR /I "IORRT" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo IF ERRORLEVEL 1 ( >>%SystemDrive%\Trial\IR7\IR7.bat echo GOTO TrialFolderDelete >>%SystemDrive%\Trial\IR7\IR7.bat echo ) ELSE ( >>%SystemDrive%\Trial\IR7\IR7.bat echo GOTO IR7FolderDelete >>%SystemDrive%\Trial\IR7\IR7.bat echo ) >>%SystemDrive%\Trial\IR7\IR7.bat echo :TrialFolderDelete>>%SystemDrive%\Trial\IR7\IR7.bat echo echo rd /s /q %SystemDrive%\Trial ^>NUL ^>^>%SystemDrive%\removeTrial.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo echo schtasks /delete /tn "removeTrial" /f ^>NUL ^>^>%SystemDrive%\removeTrial.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo echo del /F /Q %SystemDrive%\removeTrial.bat ^>nul ^>^>%SystemDrive%\removeTrial.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /create /tn "removeTrial" /tr "%SystemDrive%\removeTrial.bat" /sc onlogon /ru "" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /run /tn "removeTrial" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo GOTO :Exit >>%SystemDrive%\Trial\IR7\IR7.bat echo :IR7FolderDelete>>%SystemDrive%\Trial\IR7\IR7.bat echo echo rd /s /q %SystemDrive%\Trial\IR7 ^>NUL ^>^>%SystemDrive%\removeIR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo echo schtasks /delete /tn "removeIR7" /f ^>NUL ^>^>%SystemDrive%\removeIR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo echo del /F /Q %SystemDrive%\removeIR7.bat ^>nul ^>^>%SystemDrive%\removeIR7.bat >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /create /tn "removeIR7" /tr "%SystemDrive%\removeIR7.bat" /sc onlogon /ru "" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo schtasks /run /tn "removeIR7" ^>NUL >>%SystemDrive%\Trial\IR7\IR7.bat echo GOTO :Exit >>%SystemDrive%\Trial\IR7\IR7.bat
Just in case you've missed this post, I provided you with a very simple solution to help manage multiple nesting of your scripts.
Thank you for your help Right now I'm just trying to add the two msg box's that are given whether or not Yes/No button is pressed