The following snippets work fine when run as a USER within Windows XP and Windows 7.
It will run within a shutdown script (SYSTEM) within Windows XP.
As a shutdown script for Windows 7 the entire script will execute normally to its end, but neither of these statements will produce anything visible (no popups, no full screen .hta), nor produce any error.
=-=-=-=-=-=-=-=-=-=-
Dim intButton : intButton = objShell.Popup( lstrAppName & "... is queued." _
& vbCRLF & vbCRLF & "Do nothing to install, or click anything to abort.", 60, gstrPopUpTitle, 48 )
Select Case intButton
Case -1
Call objShell.Popup( "Thank you!" _
& vbCRLF & vbCRLF & lstrAppName & " will now install.", 10, gstrPopUpTitle, 32 )
Case 1
Call objShell.Popup( "You have chosen to postpone the installation of: " _
& vbCRLF & vbCRLF & lstrAppName _
& vbCRLF & vbCRLF & "You will be prompted to make this choice again at your next restart/shutdown.", 10, gstrPopUpTitle, 16 )
End Select
=-=-=-=-=-=-=-=-=-=-
objShell.Run """\\" & lstrSrcSrvr & "\deploy\software\INSTALL ME.hta""", 0, False
or
objShell.Run "c:\windows\system32\mshta.exe ""\\" & lstrSrcSrvr & "\deploy\software\INSTALL ME.hta""", 0, False
=-=-=-=-=-=-=-=-=-=-
I need the popup and .hta to appear during Windows 7 shutdown. How do Magoo?
↧
objShell.Popup and .hta in a shutdown script
↧