This shows you the differences between two versions of the page.
userspace:nettime_3.14_network_time_3.14 [2014/11/20 12:16] staube [install3264.ins script:] |
userspace:nettime_3.14_network_time_3.14 [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Tested with OPSI 4.0.4.0\\ | ||
- | Winst 4.11.3.11\\ | ||
- | Works fine with Win7 x86 and x64 (and probable with Windows XP).\\ | ||
- | by --- //[[S. Taube]] 2014/11/20 12:00// | ||
- | \\ | ||
- | \\ | ||
- | ======NetTime 3.14 / Network Time 3.14====== | ||
- | You need the Installer for NetTime\\ | ||
- | And You can download it here: http:// | ||
- | \\ | ||
- | =====Steps====== | ||
- | -Attention!!! - I have named the install and uninstall files like these: ' | ||
- | -Create a Directory called ' | ||
- | -Download the Installer for NetTime 3.14 / Network Time 3.14 \\ and put it to the CLIENT_DATA\files -directory on your Workbench.\\ | ||
- | -Create two new registry-files named ' | ||
- | -Create new textfiles in the CLIENT_DATA-directory and fill them up with the scripts provided down there.\\ | ||
- | -Ready the package and install it on your server. | ||
- | ===thats it=== | ||
- | ====setup3264.ins==== | ||
- | <code winst> | ||
- | [Initial] | ||
- | SetLogLevel=9 | ||
- | ; Log Errors in Logfile but don't abort: | ||
- | ExitOnError=false | ||
- | ; Show syntax errors in the script: | ||
- | ScriptErrorMessages=on | ||
- | ; Dont trace step by step through the script: | ||
- | TraceMode=off | ||
- | ; let started programs run in front of the winst window | ||
- | StayOnTop=false | ||
- | |||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $MsiId32$ | ||
- | DefVar $UninstallProgram32$ | ||
- | DefVar $UninstallProgram32_2$ | ||
- | DefVar $MsiId64$ | ||
- | DefVar $UninstallProgram64$ | ||
- | DefVar $UninstallProgram64_2$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $MinimumSpace$ | ||
- | DefVar $InstallDir32$ | ||
- | DefVar $InstallDir64$ | ||
- | DefVar $InstallDir64_2$ | ||
- | DefVar $Regschluessel32$ | ||
- | DefVar $Regschluessel64$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | |||
- | DefVar $Flag$ | ||
- | DefVar $WinstRegKey$ | ||
- | DefVar $RebootRegVar$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | |||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | ; | ||
- | ; therefore please: only lower letters, no umlauts, | ||
- | ; no white space use ' | ||
- | Set $ProductId$ | ||
- | Set $MinimumSpace$ | ||
- | ; the path were we find the product after the installation | ||
- | Set $InstallDir32$ | ||
- | Set $InstallDir64$ | ||
- | Set $InstallDir64_2$ | ||
- | Set $Regschluessel32$ = " | ||
- | Set $Regschluessel64$ = " | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | |||
- | Set $WinstRegKey$ = " | ||
- | Set $Flag$ = GetRegistryStringValue32(" | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | |||
- | ; Script entnommen von http:// | ||
- | |||
- | if not ($Flag$ = " | ||
- | ; | ||
- | ; Anweisungen vor Reboot | ||
- | |||
- | ; | ||
- | |||
- | ; Reboot initialisieren ... | ||
- | Set $Flag$ = " | ||
- | Registry_SaveRebootFlag | ||
- | ExitWindows / | ||
- | |||
- | else | ||
- | ; | ||
- | ; Anweisungen nach Reboot | ||
- | |||
- | ; Rebootflag zurücksetzen | ||
- | Set $Flag$ = " | ||
- | Registry_SaveRebootFlag | ||
- | |||
- | ; die eigentlichen Anweisungen | ||
- | |||
- | Sub_Files_doMore | ||
- | |||
- | endif | ||
- | |||
- | |||
- | |||
- | comment " | ||
- | ExitWindows /Reboot | ||
- | |||
- | |||
- | |||
- | |||
- | [Sub_Files_doMore] | ||
- | if not(HasMinimumSpace (" | ||
- | LogError "Not enough space on %SystemDrive%, | ||
- | isFatalError | ||
- | ; Stop process and set installation status to failed | ||
- | else | ||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | if $LicenseRequired$ = " | ||
- | comment " | ||
- | Sub_get_licensekey | ||
- | endif | ||
- | |||
- | comment " | ||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | comment "Start setup program" | ||
- | ChangeDirectory " | ||
- | Winbatch_install | ||
- | Sub_check_exitcode | ||
- | comment "Patch Registry" | ||
- | Winbatch_reg_32 | ||
- | endif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | comment "Start setup program" | ||
- | ChangeDirectory " | ||
- | Winbatch_install | ||
- | Sub_check_exitcode | ||
- | comment "Patch Registry" | ||
- | Winbatch_reg_64 | ||
- | endif | ||
- | |||
- | endif | ||
- | |||
- | |||
- | |||
- | [Registry_SaveRebootFlag] | ||
- | openKey [$WinstRegKey$] | ||
- | set " | ||
- | |||
- | |||
- | [Winbatch_install] | ||
- | " | ||
- | |||
- | |||
- | [Winbatch_reg_32] | ||
- | " | ||
- | |||
- | |||
- | [Winbatch_reg_64] | ||
- | " | ||
- | |||
- | |||
- | |||
- | DefVar $ServiceErrorClass$ | ||
- | set $ServiceErrorClass$ = getLastServiceErrorClass | ||
- | comment "Error class: " + $ServiceErrorClass$ | ||
- | |||
- | if $ServiceErrorClass$ = " | ||
- | comment " | ||
- | else | ||
- | if $ServiceErrorClass$ = " | ||
- | LogError " | ||
- | LogError getLastServiceErrorMessage | ||
- | isFatalError | ||
- | else | ||
- | if $ServiceErrorClass$ = " | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | |||
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | |||
- | </ | ||
- | |||
- | |||
- | ====uninstall3264.ins==== | ||
- | <code winst> | ||
- | ; Copyright (c) uib gmbh (www.uib.de) | ||
- | ; This sourcecode is owned by uib gmbh | ||
- | ; and published under the Terms of the General Public License. | ||
- | ; credits: http:// | ||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $MsiId32$ | ||
- | DefVar $UninstallProgram32$ | ||
- | DefVar $UninstallProgram32_2$ | ||
- | DefVar $MsiId64$ | ||
- | DefVar $UninstallProgram64$ | ||
- | DefVar $UninstallProgram64_2$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $InstallDir32$ | ||
- | DefVar $InstallDir64$ | ||
- | DefVar $InstallDir64_2$ | ||
- | DefVar $Regschluessel32$ | ||
- | DefVar $Regschluessel64$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | |||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | ; | ||
- | ; therefore please: only lower letters, no umlauts, | ||
- | ; no white space use ' | ||
- | Set $ProductId$ | ||
- | ; the path were we find the product after the installation | ||
- | Set $InstallDir32$ | ||
- | Set $InstallDir64$ | ||
- | Set $InstallDir64_2$ | ||
- | Set $Regschluessel32$ = " | ||
- | Set $Regschluessel64$ = " | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | |||
- | comment "Show product picture" | ||
- | ShowBitmap " | ||
- | |||
- | Message " | ||
- | |||
- | if FileExists(" | ||
- | comment "Start uninstall sub section" | ||
- | Sub " | ||
- | endif | ||
- | |||
- | if $LicenseRequired$ = " | ||
- | comment " | ||
- | Sub_free_license | ||
- | endif | ||
- | |||
- | |||
- | [Sub_free_license] | ||
- | comment " | ||
- | |||
- | comment " | ||
- | DefVar $result$ | ||
- | Set $result$ = FreeLicense($LicensePool$) | ||
- | ; If there is an assignment of a license pool to the product, it is possible to use | ||
- | ; Set $result$ = FreeLicense("", | ||
- | ; | ||
- | ; If there is an assignment of a license pool to a windows software id, it is possible to use | ||
- | ; DefVar $WindowsSoftwareId$ | ||
- | ; $WindowsSoftwareId$ = " | ||
- | ; set $result$ = FreeLicense("", | ||
- | |||
- | </ | ||
- | |||
- | |||
- | ====delsub3264.ins==== | ||
- | <code winst> | ||
- | ; Copyright (c) uib gmbh (www.uib.de) | ||
- | ; This sourcecode is owned by uib gmbh | ||
- | ; and published under the Terms of the General Public License. | ||
- | ; credits: http:// | ||
- | |||
- | |||
- | Set $UninstallProgram32$ = $InstallDir32$ + " | ||
- | |||
- | Set $UninstallProgram64$ = $InstallDir64$ + " | ||
- | Set $UninstallProgram64_2$ = $InstallDir64_2$ + " | ||
- | |||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | |||
- | if FileExists($UninstallProgram32$) | ||
- | comment " | ||
- | Winbatch_uninstall_32 | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | comment " | ||
- | Files_uninstall_32 /32Bit | ||
- | comment " | ||
- | Registry_uninstall_32 /32Bit | ||
- | endif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | |||
- | if FileExists($UninstallProgram64$) | ||
- | comment " | ||
- | Winbatch_uninstall_64 | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | if FileExists($UninstallProgram64_2$) | ||
- | comment " | ||
- | Winbatch_uninstall_64_2 | ||
- | sub_check_exitcode | ||
- | endif | ||
- | |||
- | comment " | ||
- | Files_uninstall_64 /64Bit | ||
- | comment " | ||
- | Registry_uninstall_64 /64Bit | ||
- | endif | ||
- | |||
- | comment " | ||
- | LinkFolder_uninstall | ||
- | |||
- | |||
- | ; | ||
- | |||
- | |||
- | |||
- | [Winbatch_uninstall_32] | ||
- | ; Choose one of the following examples as basis for program uninstall | ||
- | ; | ||
- | ; === Nullsoft Scriptable Install System ================================================================ | ||
- | ; maby better Call as | ||
- | ; Winbatch_uninstall / | ||
- | ; " | ||
- | ; | ||
- | ; === Inno Setup ======================================================================================== | ||
- | ; " | ||
- | ;" | ||
- | |||
- | " | ||
- | |||
- | |||
- | |||
- | [Files_uninstall_32] | ||
- | ; Example for recursively deleting the installation directory (don't forget the trailing backslash): | ||
- | ; | ||
- | ; delete -sf " | ||
- | |||
- | delete -sf " | ||
- | |||
- | |||
- | |||
- | [Registry_uninstall_32] | ||
- | ; Example of deleting a registry key: | ||
- | ; | ||
- | deletekey [HKEY_LOCAL_MACHINE\Software\$Regschluessel32$] | ||
- | |||
- | |||
- | |||
- | |||
- | [Winbatch_uninstall_64] | ||
- | ; Choose one of the following examples as basis for program uninstall | ||
- | ; | ||
- | ; === Nullsoft Scriptable Install System ================================================================ | ||
- | ; maby better Call as | ||
- | ; Winbatch_uninstall / | ||
- | ; " | ||
- | ; | ||
- | ; === Inno Setup ======================================================================================== | ||
- | ; " | ||
- | ; " | ||
- | |||
- | " | ||
- | |||
- | [Winbatch_uninstall_64_2] | ||
- | " | ||
- | |||
- | |||
- | |||
- | [Files_uninstall_64] | ||
- | ; Example for recursively deleting the installation directory: | ||
- | ; | ||
- | ; del -sf " | ||
- | |||
- | del -sf " | ||
- | del -sf " | ||
- | |||
- | |||
- | |||
- | [Registry_uninstall_64] | ||
- | ; Example of deleting a registry key: | ||
- | ; | ||
- | deletekey [HKEY_LOCAL_MACHINE\Software\$Regschluessel64$] | ||
- | |||
- | |||
- | |||
- | [Sub_check_exitcode] | ||
- | comment "Test for installation success via exit code" | ||
- | set $ExitCode$ = getLastExitCode | ||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | if ($ExitCode$ = " | ||
- | comment "Looks good: setup program gives exitcode zero" | ||
- | else | ||
- | comment "Setup program gives a exitcode unequal zero: " + $ExitCode$ | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 1641" | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment "looks good: setup program gives exitcode 3010" | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | |||
- | </ | ||
- | |||
- | |||
- | |||
- | ======Registry-Files====== | ||
- | Attention: Please enter under " | ||
- | If you want to install NetTime without your own Specials, please comment the following lines out:\\ | ||
- | ===install3264.ins script:==== | ||
- | <code winst> | ||
- | [Winbatch_reg_32] | ||
- | ; " | ||
- | |||
- | |||
- | [Winbatch_reg_64] | ||
- | ; " | ||
- | </ | ||
- | |||
- | =====uninstall3264.ins script: | ||
- | <code winst> | ||
- | [Registry_uninstall_32] | ||
- | ; Example of deleting a registry key: | ||
- | ; | ||
- | ;deletekey [HKEY_LOCAL_MACHINE\Software\$Regschluessel32$] | ||
- | |||
- | |||
- | [Registry_uninstall_64] | ||
- | ; Example of deleting a registry key: | ||
- | ; | ||
- | ;deletekey [HKEY_LOCAL_MACHINE\Software\$Regschluessel64$] | ||
- | </ | ||
- | |||
- | Now you don't need the following Registry-Files! | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | Please use for the Registry-files the Notepad++ Editor | ||
- | |||
- | ====nettime32.reg==== | ||
- | < | ||
- | Windows Registry Editor Version 5.00 | ||
- | |||
- | [HKEY_LOCAL_MACHINE\SOFTWARE\Subjective Software] | ||
- | |||
- | [HKEY_LOCAL_MACHINE\SOFTWARE\Subjective Software\NetTime] | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | |||
- | </ | ||
- | |||
- | ====nettime64.reg==== | ||
- | < | ||
- | Windows Registry Editor Version 5.00 | ||
- | |||
- | [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Subjective Software] | ||
- | |||
- | [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Subjective Software\NetTime] | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | |||
- | </ | ||
- | |||