I made an installer using the admin-user. For some reason when the installation is complete while logged in as admin, it does not reboot. It's the second admin-installer I made and that runs fine. I don't see where I made an error. If I force a reboot after it "hangs" (user interaction is disabled), it terminates without problems, and the software seems successfully installed.
This is the local-setup :
Code: Alles auswählen
; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/credits/
[Actions]
requiredWinstVersion >= "4.10.5"
DefVar $MsiId$
DefVar $UninstallProgram$
DefVar $LogDir$
DefVar $ProductId$
DefVar $MinimumSpace$
DefVar $InstallDir$
DefVar $ExitCode$
DefVar $LicenseRequired$
DefVar $LicenseKey$
DefVar $LicensePool$
DefVar $ProdInstallFile$
DefVar $ProdVer$
Set $LogDir$ = "%SystemDrive%\tmp"
; ----------------------------------------------------------------
; - Please edit the following values -
; ----------------------------------------------------------------
Set $ProductId$ = "GC-Prevue"
Set $ProdVer$ = "GC-Prevue 19.1.2"
Set $MinimumSpace$ = "8 MB"
; the path were we find the product after the installation
Set $InstallDir$ = "%ProgramFilesDir%\GraphiCode\$ProdVer$"
Set $LicenseRequired$ = "false"
Set $LicensePool$ = "p_" + $ProductId$
Set $MsiId$ = "{FFB61912-3942-4EC0-B7B6-0B32695CB436}"
; ----------------------------------------------------------------
if GetSystemType = "64 Bit System"
set $ProdInstallFile$ = "GC-Prevue.msi"
comment "64 bit install"
else
set $ProdInstallFile$ = "GC-Prevue.msi"
comment "32 bit install"
endif
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
isFatalError
; Stop process and set installation status to failed
else
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
if FileExists("%ScriptPath%\delsub.ins")
comment "Start uninstall sub section"
Sub "%ScriptPath%\delsub.ins"
endif
Message "Installing " + $ProductId$ + " ..."
comment "Start setup program"
Winbatch_install
Sub_check_exitcode
comment "Copy files"
Files_install
comment "Patch Registry"
Registry_install
comment "Create shortcuts"
LinkFolder_install
comment "Test for installation success"
; Test if software marked as installed in registry
if (GetRegistryStringValue("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$MsiId$] DisplayName") = "")
logError "Fatal: After Installation GC-prevue not found"
isFatalError
else
comment "Successful Installation"
endif
comment " rebooting windows "
ExitWindows /Reboot
comment " after reboot sent "
endif
[Winbatch_install]
msiexec /i "%ScriptPath%\$ProdInstallFile$" /l* "$LogDir$\$ProductId$.install_log.txt" /qn ALLUSERS=2
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
if ($ExitCode$ = "0")
comment "Looks good: setup program gives exitcode zero"
else
comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
if ($ExitCode$ = "1605")
comment "ERROR_UNKNOWN_PRODUCT 1605 This action is only valid for products that are currently installed."
comment "Uninstall of a not installed product failed - no problem"
else
if ($ExitCode$ = "1641")
comment "looks good: setup program gives exitcode 1641"
comment "ERROR_SUCCESS_REBOOT_INITIATED 1641 The installer has initiated a restart. This message is indicative of a success."
else
if ($ExitCode$ = "3010")
comment "looks good: setup program gives exitcode 3010"
comment "ERROR_SUCCESS_REBOOT_REQUIRED 3010 A restart is required to complete the install. This message is indicative of a success."
else
logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
isFatalError
endif
endif
endif
endif
If you like I can provide the whole structure of the installer.
Thanks.
Regards,
Koenraad Lelong.