Hi,
I have a vbscript with a 'Do' section that should invoke a pop up timer. This works well on XP, but on W7 x64 I am not even getting the pop up. The code short of the MSI file being different for each respective platform is exactly the same. Any ideas?
Dim oShell, fso, prodir, strKeyPath
Dim path, i, dpath
Dim strComputer
Dim strDirectory, sScriptDir
Dim sTitle: sTitle = "My Title"
Dim sLogHeader : sLogHeader = sTitle & VbCrLf
'Wscript.Echo sTitle
strComputer = "."
set oShell= CreateObject("Wscript.Shell")
set oEnv = oShell.Environment("PROCESS")
oEnv("SEE_MASK_NOZONECHECKS") = 1
Set fso = CreateObject("Scripting.FileSystemObject")
sScriptDir = "C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagement\Software Delivery\{2803ADA4-5C8E-45BD-87BC-459445C57B2E}\cache\"
'Wscript.Echo sScriptDir
If fso.FileExists(sScriptDir & "MyApp.msi") Then
path = Chr(34) & sScriptDir & "MyApp.msi" & Chr(34)
sSwitch1 = " /qn"
sSwitch2 = " /norestart"
'wscript.echo path
i = 0
i = oShell.Run(path & sSwitch1 & sSwitch2 , 0 ,True)
If (i = 0) Or (i = 3010) Then
do
varRestart = oShell.Popup ("My pop up message", 3600, sTitle, vbExclamation+vbYesNo+vbSystemModal)
if (varRestart = vbYes) then
strShutdown = "shutdown -r -t 120 -f -m \\" & strComputer
oShell.Run strShutdown
end if
wscript.sleep 300000
loop
End If
End If
Thank you.
I have a vbscript with a 'Do' section that should invoke a pop up timer. This works well on XP, but on W7 x64 I am not even getting the pop up. The code short of the MSI file being different for each respective platform is exactly the same. Any ideas?
Dim oShell, fso, prodir, strKeyPath
Dim path, i, dpath
Dim strComputer
Dim strDirectory, sScriptDir
Dim sTitle: sTitle = "My Title"
Dim sLogHeader : sLogHeader = sTitle & VbCrLf
'Wscript.Echo sTitle
strComputer = "."
set oShell= CreateObject("Wscript.Shell")
set oEnv = oShell.Environment("PROCESS")
oEnv("SEE_MASK_NOZONECHECKS") = 1
Set fso = CreateObject("Scripting.FileSystemObject")
sScriptDir = "C:\Program Files\Altiris\Altiris Agent\Agents\SoftwareManagement\Software Delivery\{2803ADA4-5C8E-45BD-87BC-459445C57B2E}\cache\"
'Wscript.Echo sScriptDir
If fso.FileExists(sScriptDir & "MyApp.msi") Then
path = Chr(34) & sScriptDir & "MyApp.msi" & Chr(34)
sSwitch1 = " /qn"
sSwitch2 = " /norestart"
'wscript.echo path
i = 0
i = oShell.Run(path & sSwitch1 & sSwitch2 , 0 ,True)
If (i = 0) Or (i = 3010) Then
do
varRestart = oShell.Popup ("My pop up message", 3600, sTitle, vbExclamation+vbYesNo+vbSystemModal)
if (varRestart = vbYes) then
strShutdown = "shutdown -r -t 120 -f -m \\" & strComputer
oShell.Run strShutdown
end if
wscript.sleep 300000
loop
End If
End If
Thank you.