Archive: Vista: having trouble spawning installers


Vista: having trouble spawning installers
I'm writing an installer to install symantec on windows xp, 2000, and windows vista, as well as configure them to use a hosted symantec antivirus server for my organization. I've gotten the xp and 2000 part of the code hammered out ok, but whenever i run the installer on vista, msiexec doesn't install the vista symantec msi package. The installer script is pretty long because of all the stuff i need to undo for the xp machines i will be installing on, but here's the relevant vista code:

Section "Install Symantec Antivirus" preSymantec

SetOutPath "$INSTDIR"
Clearerrors
;write avinstaller
File "Finish.exe"
Strcmp $WINVER "Vista" Vistafiles 0
File "savce1002clt\Symantec AntiVirus.msi"
File "savce1002clt\Data1.cab"
File "savce10.0.2.2020\SAV_10.0.2.2020_AllWin_EN.msp"
File "savce10.0.2.2021\SAVCE_10.0.2.2021_AllWin_EN.msp"
Goto afterfiles
Vistafiles:
File "SAVVISTA\Symantec AntiVirus.msi"
File "SAVVISTA\Data1.cab"

Afterfiles:
;check to see if reboot required. if so, postpone installation until after reboot
IntCmp $RebootReq 1 0 AVnoReboot AVnoReboot

;set rebootflag
SetRebootFlag True

;create regkey to installer to launch it on reboot
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Run" "JHU Finish" "$INSTDIR\Finish.exe"

;Store installation folder
WriteRegStr HKLM "Software\JHU" "Installation Directory" $INSTDIR

;Store windows version
WriteRegStr HKLM "Software\JHU" "Windows Version" $WINVER

;Set installation value to true
WriteRegDWORD HKLM "Software\JHU" "Inst AV" "1"

;skip install
Goto AVcontinue
;run av installer now
intop $0 0 + 0 ;loop variable
AVnoReboot:
InstAV:
ClearErrors
Detailprint "Windows Version: $WINVER"
;If vista, run the vista installer
Strcmp $WINVER "Vista" VistaAV 0
Win2k:
;putting in these sleep periods to try to stablize some erratic installer behavior thats been happening.
Execwait '"Msiexec.exe" /i "$INSTDIR\Symantec AntiVirus.msi" /passive Reboot=ReallySuppress'
sleep 5000
Execwait '"Msiexec.exe" /p SAV_10.0.2.2020_AllWin_EN.msp /passive REINSTALL=ALL REINSTALLMODE=omus /l*v c:\patchlog.txt'
sleep 1000
Execwait '"Msiexec.exe" /p SAVCE_10.0.2.2021_AllWin_EN.msp /passive REINSTALL=ALL REINSTALLMODE=omus /l*v c:\patchlog.txt'
IfErrors AVErrors AVNoErrors
VistaAV:
Execwait '"Msiexec.exe /i "$INSTDIR\Symnatec Antivirus.msi" /passive Reboot=ReallySuppress'
IfErrors AVErrors AVNoErrors
AVErrors:
;sometimes the installer doesn't work until the second time, so this loop just waits until the third time to bother the user.
intop $0 $0 + 1
intcmp $0 3 0 InstAV 0
MessageBox MB_YESNO|MB_DEFBUTTON1|MB_ICONQUESTION "Antivirus Installation Unsuccessful. Try Again?" \
IDYES InstAV IDNO AVNoErrors
AVNoErrors:
DeleteRegValue HKLM "Software\JHU" "Inst AV"
Delete "$INSTDIR\Finish.exe"
Delete "$INSTDIR\Data1.cab"
Delete "$INSTDIR\Symantec AntiVirus.msi"
Delete "$INSTDIR\SAV_10.0.2.2020_AllWin_EN.msp"
Delete "$INSTDIR\SAVCE_10.0.2.2021_AllWin_EN.msp"
RMDir "$INSTDIR"
AVcontinue:

SectionEnd

All the storing and reboot detecting is for xp and 2000, as the previous section uninstalls older versions of symantec if necissary, then reboots(i've dissabled that section in vista, as this will be the first vista distribution). Anyway, when i run it, it acts just like when i try to run msiexec.exe on the package from the command line without enough privilages. I've tried switching to exec or nsExec without any luck, and i've included "RequestExecutionLevel admin" at the beginning of the installer in hopes of getting it to work right, but no luck yet. I would apreciate any help anyone could give, as i've got to roll this out soon and haven't the foggiest as to how to fix it.


When you run your installer on Vista, does it bring up the prompt to ask you to elevate the process as administrator?


When i start the main installer, it brings up a window asking for permission. the behavior doesn't change when i left click and select "Run as an administrator." When it calls msiexec, it doesn't say anything at all. the first time around msiexec returns an error(causing it to loop), the second time through the loop it doesn't, but both times it fails to install/do anything as far as i can tell.


Have spent most of the day trying to get it to work and discovered that none of my exec calls are working in vista, despite running the program at admin level. Does anyone know why this isn't working(am i overlooking something obvious somewhere?)


You have a missing quote in the ExecWait line following the VistaAV label. If that's not the problem, create a minimal example that reproduces the problem on Vista and attach it.


Thanks for the pointer! That, several hours and other typos later, turned out to be the key hickup, and I'm happy to say I now have a final build! thanks for the help!