Jump to content

Error parsing function call. Line -1. Please help


lernebo
 Share

Recommended Posts

We have been using AutoIt for several years to create a single customized script for a Symantec AV intstall. Originally a consultant came in and built the script. We have always had the same syntax errors, but the script worked, through the different versions of SAV. Now we are upgrading to a new version of SAV, and we are now getting the parsing function call error, after the first Message Box appears.

Here is the script:

;;This is for SAV 10.1.8.8000

;; This line of script prevents AutoIt icon from displaying in Systray

Opt("TrayIconHide", 1)

MsgBox(0, "Hennepin County AntiVirus Migration", "The migration process to Symantec AntiVirus will reboot your computer at the end of the process. Please save your work now.", 30)

;; This sections checks for the existence of a server operating system

$var10 = @OSBuild

if $var10="3790" Then MsgBox(0, "This is not for installation on a Server Operating System.", "Sorry you need to use the correct version.", 30)

if $var10="3790" Then Exit

;; This section checks for the existence of a SCS 3.x Client Install

$var02 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion\", "ClientGroup")

If $var02="" Then $var02="Temp"

;; This section of script installs SAV utilizing the correct command line based on version of MSI. Gets Major version

$var30 = StringLeft(FileGetVersion("msiexec.exe"),1)

If $var30="2" then RunWait('msiexec.exe /i "Symantec AntiVirus.msi" /qn REBOOT=ReallySuppress MIGRATESETTINGS=0 RUNLIVEUPDATE=0 SYMPROTECTDISABLED=0', "",)

If $var30="3" then RunWait('msiexec.exe /i "Symantec AntiVirus.msi" /qn /norestart MIGRATESETTINGS=0 RUNLIVEUPDATE=0 SYMPROTECTDISABLED=0', "",)

If $var30="4" then MsgBox(0,"Microsoft Vista is not a supported Operating System. Please Contact IT.SAV.Support.", 30).

If $var30="4" then Exit

;; This section removes crud that the SAV uninstall SHOULD remove

If FileExists ("C:\Program Files\Symantec_Client_Security\Symantec AntiVirus\rtvscan.exe") Then Exit

DirRemove ("C:\Program Files\Symantec_Client_Security", 1)

;; This line stops the SAVCE service

$var41 = @OSBuild

If $var41="2195" Then RunWait('net stop "Symantec AntiVirus"', "",)

If $var41="2600" Then RunWait('sc.exe stop "Symantec AntiVirus"', "",)

;; This section pauses the script for 62 seconds

sleep(30000)

;; This section assigns the client to it's previous group, if it is an upgrade, of assigns to "Temp" if it is a new install

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion\","ClientGroup","REG_SZ", $var02)

;; This section restarts the SAV service

If $var41="2195" Then RunWait('net start "Symantec AntiVirus"', "",)

If $var41="2600" Then RunWait('sc.exe start "Symantec AntiVirus"', "",)

;;This section disables the Tamper Protection Service and Driver

RunWait("tamper_protection_service_off.bat","",)

MsgBox(0, "Hennepin County AntiVirus Migration", "Just a reminder that the migration process to Symantec AntiVirus will reboot your computer at the end of the process. We hope that you have saved your work. You will reboot in 1 minute.", 60)

;; This section closes the splash screen, opens a dialogue box indicating the process is complete

MsgBox(0, "Hennepin County AntiVirus Migration", "The migration process to Symantec AntiVirus is now complete, your computer will be rebooted in 10 seconds.", 10)

Shutdown(6)

Link to comment
Share on other sites

a single customized script for a Symantec AV intstall.

I pity your soul.

You had minor syntax errors. Several extra Commas and such.

;;This is for SAV 10.1.8.8000

;; This line of script prevents AutoIt icon from displaying in Systray
Opt("TrayIconHide", 1)

MsgBox(0, "Hennepin County AntiVirus Migration", "The migration process to Symantec AntiVirus will reboot your computer at the end of the process. Please save your work now.", 30)

;; This sections checks for the existence of a server operating system
$var10 = @OSBuild
If $var10 = "3790" Then MsgBox(0, "This is not for installation on a Server Operating System.", "Sorry you need to use the correct version.", 30)
If $var10 = "3790" Then Exit

;; This section checks for the existence of a SCS 3.x Client Install
$var02 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion\", "ClientGroup")
If $var02 = "" Then $var02 = "Temp"

;; This section of script installs SAV utilizing the correct command line based on version of MSI. Gets Major version
$var30 = StringLeft(FileGetVersion("msiexec.exe"), 1)

If $var30 = "2" Then RunWait('msiexec.exe /i "Symantec AntiVirus.msi" /qn REBOOT=ReallySuppress MIGRATESETTINGS=0 RUNLIVEUPDATE=0 SYMPROTECTDISABLED=0', "")
If $var30 = "3" Then RunWait('msiexec.exe /i "Symantec AntiVirus.msi" /qn /norestart MIGRATESETTINGS=0 RUNLIVEUPDATE=0 SYMPROTECTDISABLED=0', "")
If $var30 = "4" Then MsgBox(0, "Microsoft Vista is not a supported Operating System. Please Contact IT.SAV.Support.", 30)
If $var30 = "4" Then Exit

;; This section removes crud that the SAV uninstall SHOULD remove
If FileExists("C:\Program Files\Symantec_Client_Security\Symantec AntiVirus\rtvscan.exe") Then Exit
DirRemove("C:\Program Files\Symantec_Client_Security", 1)

;; This line stops the SAVCE service
$var41 = @OSBuild
If $var41 = "2195" Then RunWait('net stop "Symantec AntiVirus"', "")
If $var41 = "2600" Then RunWait('sc.exe stop "Symantec AntiVirus"', "")

;; This section pauses the script for 62 seconds
Sleep(30000)

;; This section assigns the client to it's previous group, if it is an upgrade, of assigns to "Temp" if it is a new install
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion\", "ClientGroup", "REG_SZ", $var02)

;; This section restarts the SAV service
If $var41 = "2195" Then RunWait('net start "Symantec AntiVirus"', "")
If $var41 = "2600" Then RunWait('sc.exe start "Symantec AntiVirus"', "")

;;This section disables the Tamper Protection Service and Driver
RunWait("tamper_protection_service_off.bat", "")

MsgBox(0, "Hennepin County AntiVirus Migration", "Just a reminder that the migration process to Symantec AntiVirus will reboot your computer at the end of the process. We hope that you have saved your work. You will reboot in 1 minute.", 60)

;; This section closes the splash screen, opens a dialogue box indicating the process is complete
MsgBox(0, "Hennepin County AntiVirus Migration", "The migration process to Symantec AntiVirus is now complete, your computer will be rebooted in 10 seconds.", 10)
Shutdown(6)

Try this

Link to comment
Share on other sites

Darn consultants. That is the first time in 2 years that I have seen it compile without errors.

It works.

Thanks.

I pity your soul.

You had minor syntax errors. Several extra Commas and such.

;;This is for SAV 10.1.8.8000

;; This line of script prevents AutoIt icon from displaying in Systray
Opt("TrayIconHide", 1)

MsgBox(0, "Hennepin County AntiVirus Migration", "The migration process to Symantec AntiVirus will reboot your computer at the end of the process. Please save your work now.", 30)

;; This sections checks for the existence of a server operating system
$var10 = @OSBuild
If $var10 = "3790" Then MsgBox(0, "This is not for installation on a Server Operating System.", "Sorry you need to use the correct version.", 30)
If $var10 = "3790" Then Exit

;; This section checks for the existence of a SCS 3.x Client Install
$var02 = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion\", "ClientGroup")
If $var02 = "" Then $var02 = "Temp"

;; This section of script installs SAV utilizing the correct command line based on version of MSI. Gets Major version
$var30 = StringLeft(FileGetVersion("msiexec.exe"), 1)

If $var30 = "2" Then RunWait('msiexec.exe /i "Symantec AntiVirus.msi" /qn REBOOT=ReallySuppress MIGRATESETTINGS=0 RUNLIVEUPDATE=0 SYMPROTECTDISABLED=0', "")
If $var30 = "3" Then RunWait('msiexec.exe /i "Symantec AntiVirus.msi" /qn /norestart MIGRATESETTINGS=0 RUNLIVEUPDATE=0 SYMPROTECTDISABLED=0', "")
If $var30 = "4" Then MsgBox(0, "Microsoft Vista is not a supported Operating System. Please Contact IT.SAV.Support.", 30)
If $var30 = "4" Then Exit

;; This section removes crud that the SAV uninstall SHOULD remove
If FileExists("C:\Program Files\Symantec_Client_Security\Symantec AntiVirus\rtvscan.exe") Then Exit
DirRemove("C:\Program Files\Symantec_Client_Security", 1)

;; This line stops the SAVCE service
$var41 = @OSBuild
If $var41 = "2195" Then RunWait('net stop "Symantec AntiVirus"', "")
If $var41 = "2600" Then RunWait('sc.exe stop "Symantec AntiVirus"', "")

;; This section pauses the script for 62 seconds
Sleep(30000)

;; This section assigns the client to it's previous group, if it is an upgrade, of assigns to "Temp" if it is a new install
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\VirusProtect6\CurrentVersion\", "ClientGroup", "REG_SZ", $var02)

;; This section restarts the SAV service
If $var41 = "2195" Then RunWait('net start "Symantec AntiVirus"', "")
If $var41 = "2600" Then RunWait('sc.exe start "Symantec AntiVirus"', "")

;;This section disables the Tamper Protection Service and Driver
RunWait("tamper_protection_service_off.bat", "")

MsgBox(0, "Hennepin County AntiVirus Migration", "Just a reminder that the migration process to Symantec AntiVirus will reboot your computer at the end of the process. We hope that you have saved your work. You will reboot in 1 minute.", 60)

;; This section closes the splash screen, opens a dialogue box indicating the process is complete
MsgBox(0, "Hennepin County AntiVirus Migration", "The migration process to Symantec AntiVirus is now complete, your computer will be rebooted in 10 seconds.", 10)
Shutdown(6)

Try this

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...