Long lines removed by NTDOC
All, I am trying to incorporate this TrendMicro UDF but it keeps failing not sure what i am doing wrong.
Can someone shed some guidance.
Code:
?$Caption = "Checking Antivirus"
?$Comment = "Checking Antivirus on your system "
dim $rc, $SetupFilespec
$SetupFilespec='\\chiau1001\ofcscan\AutoPcc.exe'
;
$SetupNotifyMsg='Trend Micro Office Scan anti-virus will be installed to your computer.' + @CRLF +
'While this process completes in the background, your system may respond a bit slower than normal. ' + @CRLF + @CRLF +
'Please do not logoff or reboot for at least 5 minutes to allow the process to complete normally.' + @CRLF + @CRLF +
'If you receive this message more than once, please notify HelpDesk at xxx xxx-xxxx.'
;
$NoSetupFileMsg='Your computer is not allowed to connect to this network without the approved Anti-Virus software. '+
'Please contact the HelpDesk at xxx xxx-xxxx for assistance.'
;
if @InWin = 1 ; NT Family
;
if not keyexist('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OfficeScanNT')
if exist($SetupFilespec)
$rc=slExec('Admin Async Hidden',$SetupFilespec,)
$rc=slAlert('X','PLEASE READ - IMPORTANT NOTICE',$SetupNotifyMsg,0,1)
Else
$rc=slAlert('X','',$NoSetupFileMsg,60,1)
$rc=slLogoff(1)
EndIf
EndIf
EndIf
EndIf
Minor modifications by NTDOC
Don't see anything in the code to call the Trend UDF or an installer
Are you using ScriptLogic with this code?
Code:
Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')
$SO=SetOption('NoMacrosInStrings','On')
Dim $Caption,$Comment,$rc, $SetupFilespec,$SetupNotifyMsg,$NoSetupFileMsg
$Caption = "Checking Antivirus" ?
$Comment = "Checking Antivirus on your system " ?
$SetupFilespec='\\chiau1001\ofcscan\AutoPcc.exe'
$SetupNotifyMsg='Trend Micro Office Scan anti-virus will be installed to your computer.' + @CRLF +
'While this process completes in the background, your system may respond a bit slower than normal. ' + @CRLF + @CRLF +
'Please do not logoff or reboot for at least 5 minutes to allow the process to complete normally.' + @CRLF + @CRLF +
'If you receive this message more than once, please notify HelpDesk at xxx xxx-xxxx.'
$NoSetupFileMsg='Your computer is not allowed to connect to this network without the approved Anti-Virus software. ' +
'Please contact the HelpDesk at xxx xxx-xxxx for assistance.'
If @InWin = 1 ; NT Family
If Not KeyExist('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OfficeScanNT')
If Exist($SetupFilespec)
$rc=slExec('Admin Async Hidden',$SetupFilespec,)
$rc=slAlert('X','PLEASE READ - IMPORTANT NOTICE',$SetupNotifyMsg,0,1)
Else
;What is slAlert ? and slLogoff - don't see them anywhere here
$rc=slAlert('X','',$NoSetupFileMsg,60,1)
$rc=slLogoff(1)
EndIf
EndIf
EndIf