This shows you the differences between two versions of the page.
userspace:autodesk_autocad_lt_2014_x86_x64 [2014/01/23 11:18] r.witzel |
userspace:autodesk_autocad_lt_2014_x86_x64 [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Autodesk AutoCAD LT 2014 x86/x64 ====== | ||
- | |||
- | ===== Foreword: ===== | ||
- | I've my very own way to create packages. I developed a package template that (to me) is very flexible and doesn' | ||
- | For this to work and to have a clear and readable structure, I created several files that include each other. | ||
- | That is why you will not simply find one setup file but several files. | ||
- | You can find each file's short description in the file tree. | ||
- | |||
- | By // | ||
- | |||
- | |||
- | ====== Shortcut: ====== | ||
- | Look for " | ||
- | |||
- | |||
- | ====== Product Description ====== | ||
- | Please see http:// | ||
- | |||
- | |||
- | ====== Opsi (winst) Version ====== | ||
- | Tested with Opsi 4.0.3.1 | ||
- | Tested with winst 4.11.3.6 | ||
- | |||
- | |||
- | ====== Script Settings ====== | ||
- | - none - | ||
- | |||
- | |||
- | ====== License-File ====== | ||
- | No license file is needed. You'll only have to enter licensing information into ConfigEd (or not if you want to run it as demo). | ||
- | |||
- | |||
- | ====== Neccessary files: ====== | ||
- | |||
- | - CLIENT_DATA | ||
- | |- files (DVD-Content) | ||
- | |-|- 3rdParty | ||
- | |-|- CER | ||
- | |-|- Content | ||
- | |-|- de-DE | ||
- | |-|- en-us | ||
- | |-|- EULA | ||
- | |-|- NLSDL | ||
- | |-|- Setup | ||
- | |-|- SetupRes | ||
- | |-|- x64 | ||
- | |-|- x86 | ||
- | |-|- autorun.inf | ||
- | |-|- MID01.txt | ||
- | |-|- Setup.exe | ||
- | |-|- setup.ini | ||
- | |- autocad_lt_2014.png | ||
- | |- delsub.ins (=> actual delete process) | ||
- | |- setup.ins (=> actual install process) | ||
- | |- sub_gather.ins (=> gather basic information) | ||
- | |- sub_package_info.ins (=> package information) | ||
- | |- sub_properties.ins (=> properties adjusted by ConfigEd) | ||
- | |- uninstall.ins (=> delsub control script) | ||
- | - OPSI | ||
- | |- control | ||
- | |||
- | ====== Code: ====== | ||
- | |||
- | === OPSI/ | ||
- | <code winst> | ||
- | [Package] | ||
- | version: 1 | ||
- | depends: | ||
- | incremental: | ||
- | |||
- | [Product] | ||
- | type: localboot | ||
- | id: autocad_lt_2014 | ||
- | name: AutoCAD LT 2014 | ||
- | description: | ||
- | advice: - | ||
- | version: 19.0.55.0.0 | ||
- | priority: 0 | ||
- | licenseRequired: | ||
- | productClasses: | ||
- | setupScript: | ||
- | uninstallScript: | ||
- | updateScript: | ||
- | alwaysScript: | ||
- | onceScript: | ||
- | customScript: | ||
- | userLoginScript: | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: create_desktop_shortcut | ||
- | multivalue: False | ||
- | editable: False | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: serial_prefix | ||
- | multivalue: False | ||
- | editable: True | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: serial_number | ||
- | multivalue: False | ||
- | editable: True | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | |||
- | [ProductProperty] | ||
- | type: unicode | ||
- | name: serial_product_key | ||
- | multivalue: False | ||
- | editable: True | ||
- | description: | ||
- | values: [" | ||
- | default: [" | ||
- | </ | ||
- | |||
- | === CLIENT_DATA\delsub.ins === | ||
- | <code winst> | ||
- | Comment "### Start of delsub.ins ###" | ||
- | |||
- | ;-- uninstall the product | ||
- | ; | ||
- | if ($fatalErrorOccured$ = " | ||
- | Message " | ||
- | |||
- | ;-- check the windows version and start the corresponding subs | ||
- | ; | ||
- | if ($WinVersion$ >= " | ||
- | comment " | ||
- | |||
- | ;-- Windows 7 (or newer), x86 | ||
- | if ($SystemType$ = "x86 System" | ||
- | comment " | ||
- | comment " | ||
- | |||
- | ;-- start scripts (comment out what you don't need or leave the sub's content empty) | ||
- | Winbatch_6_32_remove | ||
- | Dosbatch_6_32_remove | ||
- | DosInAnIcon_6_32_remove | ||
- | Files_6_32_remove /32Bit | ||
- | Registry_6_32_remove /32Bit | ||
- | LinkFolder_6_32_remove | ||
- | endif | ||
- | |||
- | ;-- Windows 7 (or newer), x64 | ||
- | if ($SystemType$ = "64 Bit System" | ||
- | comment " | ||
- | comment " | ||
- | |||
- | ;-- start scripts (comment out what you don't need or leave the sub's content empty) | ||
- | Winbatch_6_64_remove | ||
- | Dosbatch_6_64_remove | ||
- | DosInAnIcon_6_64_remove | ||
- | Files_6_64_remove /64Bit | ||
- | Registry_6_64_remove /64Bit | ||
- | LinkFolder_6_64_remove | ||
- | endif | ||
- | endif | ||
- | |||
- | if ($WinVersion$ < " | ||
- | comment " | ||
- | |||
- | ;-- Windows XP (or older), x86 | ||
- | if $SystemType$ = "x86 System" | ||
- | comment " | ||
- | comment " | ||
- | |||
- | ;-- start scripts (comment out what you don't need or leave the sub's content empty) | ||
- | Winbatch_5_32_remove | ||
- | Dosbatch_5_32_remove | ||
- | DosInAnIcon_5_32_remove | ||
- | Files_5_32_remove /32Bit | ||
- | Registry_5_32_remove /32Bit | ||
- | LinkFolder_5_32_remove | ||
- | endif | ||
- | |||
- | ;-- Windows XP (or older), x64 | ||
- | if ($SystemType$ = "64 Bit System" | ||
- | comment " | ||
- | comment " | ||
- | |||
- | ;-- start scripts (comment out what you don't need or leave the sub's content empty) | ||
- | Winbatch_5_64_remove | ||
- | Dosbatch_5_64_remove | ||
- | DosInAnIcon_5_64_remove | ||
- | Files_5_64_remove /64Bit | ||
- | Registry_5_64_remove /64Bit | ||
- | LinkFolder_5_64_remove | ||
- | endif | ||
- | endif | ||
- | |||
- | ;-- check if the program installed properly | ||
- | ; | ||
- | Sub_check_exitcode | ||
- | endif | ||
- | |||
- | ; | ||
- | ;-- subs for running the actual setup | ||
- | ; | ||
- | |||
- | [Winbatch_6_32_remove] | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | [Winbatch_6_64_remove] | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | |||
- | [Winbatch_5_32_remove] | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | [Winbatch_5_64_remove] | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | msiexec /x " | ||
- | |||
- | msiexec /x " | ||
- | |||
- | |||
- | [Dosbatch_6_32_remove] | ||
- | [Dosbatch_6_64_remove] | ||
- | [Dosbatch_5_32_remove] | ||
- | [Dosbatch_5_64_remove] | ||
- | |||
- | [DosInAnIcon_6_32_remove] | ||
- | [DosInAnIcon_6_64_remove] | ||
- | [DosInAnIcon_5_32_remove] | ||
- | [DosInAnIcon_5_64_remove] | ||
- | |||
- | [Files_6_32_remove] | ||
- | [Files_6_64_remove] | ||
- | [Files_5_32_remove] | ||
- | [Files_5_64_remove] | ||
- | |||
- | [Registry_6_32_remove] | ||
- | [Registry_6_64_remove] | ||
- | [Registry_5_32_remove] | ||
- | [Registry_5_64_remove] | ||
- | |||
- | [LinkFolder_6_32_remove] | ||
- | [LinkFolder_6_64_remove] | ||
- | [LinkFolder_5_32_remove] | ||
- | [LinkFolder_5_64_remove] | ||
- | |||
- | [Sub_check_exitcode] | ||
- | |||
- | comment " | ||
- | |||
- | set $ExitCode$ = getLastExitCode | ||
- | |||
- | ; informations to exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | |||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | else | ||
- | comment " | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment " | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | |||
- | |||
- | </ | ||
- | |||
- | === CLIENT_DATA\setup.ins === | ||
- | <code winst> | ||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | Comment "### Start of setup.ins ###" | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- Available variables in script (after prerequisites) | ||
- | ; ---------------------------------------------------------------- | ||
- | ;-- $WinVersion$ => | ||
- | ;-- $SystemType$ => | ||
- | ;-- $UserName$ => | ||
- | ;-- $UserSID$ => | ||
- | ;-- $UserContext$ => | ||
- | ;-- $ScriptMode$ => | ||
- | ;-- $OS$ => | ||
- | ;-- $NTVersion$ => | ||
- | ;-- $MsiId$ => | ||
- | ;-- $UninstallProgram$ => | ||
- | ;-- $LogDir$ => | ||
- | ;-- $ProductId$ | ||
- | ;-- $MinimumSpace$ => | ||
- | ;-- $InstallDir$ => | ||
- | ;-- $ExitCode$ => | ||
- | ;-- $LicenseRequired$ => | ||
- | ;-- $LicenseKey$ => | ||
- | ;-- $LicensePool$ => | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- set some variables | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | DefVar $fatalErrorOccured$ | ||
- | DefVar $run_delsub$ | ||
- | |||
- | Set $fatalErrorOccured$ = " | ||
- | Set $run_delsub$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- load the prerequisites | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | ;-- get the package information | ||
- | ; | ||
- | if ($fatalErrorOccured$ = " | ||
- | if FileExists(" | ||
- | Sub " | ||
- | else | ||
- | LogError " | ||
- | $faltalErrorOccured$ = " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | |||
- | ;-- gather basic data, like the windows version | ||
- | ; | ||
- | if ($fatalErrorOccured$ = " | ||
- | if FileExists(" | ||
- | Sub " | ||
- | else | ||
- | LogError " | ||
- | $fatalErrorOccured$ = " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | |||
- | ;-- gather product properties | ||
- | ; | ||
- | if ($fatalErrorOccured$ = " | ||
- | if FileExists(" | ||
- | Sub " | ||
- | else | ||
- | LogError " | ||
- | $fatalErrorOccured$ = " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | |||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- check if we have enough space to install | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | if ($fatalErrorOccured$ = " | ||
- | if not(HasMinimumSpace (" | ||
- | LogError " | ||
- | $fatalErrorOccured$ = " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- start the setup process | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | Message " | ||
- | |||
- | ;-- show the product picture | ||
- | ; | ||
- | if ($fatalErrorOccured$ = " | ||
- | if FileExists(" | ||
- | ShowBitmap " | ||
- | else | ||
- | LogError " | ||
- | endif | ||
- | endif | ||
- | |||
- | ;-- check if the Product needs a license key | ||
- | ; | ||
- | if ($LicenseRequired$ = " | ||
- | Sub_get_licensekey | ||
- | endif | ||
- | |||
- | ;-- uninstall the product | ||
- | ; | ||
- | if ($fatalErrorOccured$ = " | ||
- | if $CheckUninstallProgram$ = " | ||
- | if FileExists($UninstallProgram$) | ||
- | Set $run_delsub$ = " | ||
- | else | ||
- | Set $run_delsub$ = " | ||
- | comment " | ||
- | endif | ||
- | else | ||
- | Set $run_delsub$ = " | ||
- | endif | ||
- | endif | ||
- | |||
- | if $run_delsub$ = " | ||
- | if FileExists(" | ||
- | Sub " | ||
- | else | ||
- | LogError " | ||
- | endif | ||
- | endif | ||
- | |||
- | ;-- install the product | ||
- | ; | ||
- | |||
- | if ($fatalErrorOccured$ = " | ||
- | Message " | ||
- | |||
- | ;-- check the windows version and start the corresponding subs | ||
- | ; | ||
- | if ($WinVersion$ >= " | ||
- | comment " | ||
- | |||
- | ;-- Windows 7 (or newer), x86 | ||
- | if $SystemType$ = "x86 System" | ||
- | comment " | ||
- | comment " | ||
- | |||
- | ;-- start scripts (comment out what you don't need or leave the sub's content empty) | ||
- | Winbatch_6_32_install | ||
- | Dosbatch_6_32_install | ||
- | DosInAnIcon_6_32_install | ||
- | Files_6_32_install /32Bit | ||
- | Registry_6_32_install /32Bit | ||
- | LinkFolder_6_32_install | ||
- | endif | ||
- | |||
- | ;-- Windows 7 (or newer), x64 | ||
- | if ($SystemType$ = "64 Bit System" | ||
- | comment " | ||
- | comment " | ||
- | |||
- | ;-- start scripts (comment out what you don't need or leave the sub's content empty) | ||
- | Winbatch_6_64_install | ||
- | Dosbatch_6_64_install | ||
- | DosInAnIcon_6_64_install | ||
- | Files_6_64_install /64Bit | ||
- | Registry_6_64_install /64Bit | ||
- | LinkFolder_6_64_install | ||
- | endif | ||
- | endif | ||
- | |||
- | if ($WinVersion$ < " | ||
- | comment " | ||
- | |||
- | ;-- Windows XP (or older), x86 | ||
- | if ($SystemType$ = "x86 System" | ||
- | comment " | ||
- | comment " | ||
- | |||
- | ;-- start scripts (comment out what you don't need or leave the sub's content empty) | ||
- | Winbatch_5_32_install | ||
- | Dosbatch_5_32_install | ||
- | DosInAnIcon_5_32_install | ||
- | Files_5_32_install /32Bit | ||
- | Registry_5_32_install /32Bit | ||
- | LinkFolder_5_32_install | ||
- | endif | ||
- | |||
- | ;-- Windows XP (or older), x64 | ||
- | if ($SystemType$ = "64 Bit System" | ||
- | comment " | ||
- | comment " | ||
- | |||
- | ;-- start scripts (comment out what you don't need or leave the sub's content empty) | ||
- | Winbatch_5_64_install | ||
- | Dosbatch_5_64_install | ||
- | DosInAnIcon_5_64_install | ||
- | Files_5_64_install /64Bit | ||
- | Registry_5_64_install /64Bit | ||
- | LinkFolder_5_64_install | ||
- | endif | ||
- | endif | ||
- | |||
- | ;-- check if the program installed properly | ||
- | ; | ||
- | Sub_check_exitcode | ||
- | endif | ||
- | |||
- | ; | ||
- | ;-- subs for running the actual setup | ||
- | ; | ||
- | |||
- | [Winbatch_6_32_install] | ||
- | " | ||
- | |||
- | [Winbatch_6_64_install] | ||
- | " | ||
- | |||
- | [DosInAnIcon_6_32_install] | ||
- | [DosInAnIcon_6_64_install] | ||
- | |||
- | [Files_6_32_install] | ||
- | [Files_6_64_install] | ||
- | |||
- | [Registry_6_32_install] | ||
- | [Registry_6_64_install] | ||
- | |||
- | [LinkFolder_6_32_install] | ||
- | [LinkFolder_6_64_install] | ||
- | |||
- | ; | ||
- | ;-- sub for checking the exit code | ||
- | ; | ||
- | [Sub_check_exitcode] | ||
- | |||
- | comment " | ||
- | set $ExitCode$ = getLastExitCode | ||
- | |||
- | ; for information about exit codes see | ||
- | ; http:// | ||
- | ; http:// | ||
- | |||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | else | ||
- | comment " | ||
- | if ($ExitCode$ = " | ||
- | comment "=> Setup.ins:: | ||
- | comment " | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment "=> Setup.ins:: | ||
- | else | ||
- | if ($ExitCode$ = " | ||
- | comment " | ||
- | comment "=> Setup.ins:: | ||
- | else | ||
- | logError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | |||
- | |||
- | ; | ||
- | ;-- sub for checking the license | ||
- | ; | ||
- | [Sub_get_licensekey] | ||
- | |||
- | if opsiLicenseManagementEnabled | ||
- | comment " | ||
- | comment " | ||
- | |||
- | Set $LicenseKey$ = demandLicenseKey ($LicensePool$) | ||
- | |||
- | ; If there is an assignment of exactly one licensepool to the product the following call is possible: | ||
- | ; Set $LicenseKey$ = demandLicenseKey ("", | ||
- | ; | ||
- | ; If there is an assignment of a license pool to a windows software id, it is possible to use: | ||
- | ; DefVar $WindowsSoftwareId$ | ||
- | ; $WindowsSoftwareId$ = " | ||
- | ; Set $LicenseKey$ = demandLicenseKey ("", | ||
- | |||
- | DefVar $ServiceErrorClass$ | ||
- | set $ServiceErrorClass$ = getLastServiceErrorClass | ||
- | comment " | ||
- | |||
- | if $ServiceErrorClass$ = " | ||
- | comment " | ||
- | else | ||
- | if $ServiceErrorClass$ = " | ||
- | LogError " | ||
- | LogError getLastServiceErrorMessage | ||
- | isFatalError | ||
- | else | ||
- | if $ServiceErrorClass$ = " | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | else | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | </ | ||
- | |||
- | === CLIENT_DATA\sub_gather.ins === | ||
- | <code winst> | ||
- | Comment "### Start of sub_gather.ins ###" | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- define the needed variables | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | DefVar $WinVersion$ | ||
- | DefVar $SystemType$ | ||
- | DefVar $UserName$ | ||
- | DefVar $UserSID$ | ||
- | DefVar $UserContext$ | ||
- | DefVar $ScriptMode$ | ||
- | DefVar $OS$ | ||
- | DefVar $NTVersion$ | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- get the needed data | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | Set $WinVersion$ = GetMsVersionInfo | ||
- | Set $SystemType$ = GetSystemType | ||
- | Set $UserName$ = GetLoggedInUser | ||
- | Set $UserSID$ = GetUserSID($UserName$) | ||
- | Set $UserContext$ = GetUserContext | ||
- | Set $ScriptMode$ = GetScriptMode | ||
- | Set $OS$ = GetOS | ||
- | Set $NTVersion$ = GetMSVersionInfo | ||
- | </ | ||
- | |||
- | === CLIENT_DATA\sub_package_info.ins === | ||
- | <code winst> | ||
- | Comment "### Start of sub_package_info.ins ###" | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- define the needed variables | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | DefVar $MsiId$ | ||
- | DefVar $UninstallProgram$ | ||
- | DefVar $CheckUninstallProgram$ | ||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $MinimumSpace$ | ||
- | DefVar $InstallDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicenseKey$ | ||
- | DefVar $LicensePool$ | ||
- | |||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | ;-- where should the log be written to | ||
- | Set $LogDir$ = " | ||
- | |||
- | ;-- name of the package (lower letters, no umlauts, no white spaces) | ||
- | Set $ProductId$ = " | ||
- | |||
- | ;-- minimal required disk space | ||
- | Set $MinimumSpace$ = "700 MB" | ||
- | |||
- | ;-- where does the programm install to | ||
- | Set $InstallDir$ = " | ||
- | |||
- | if FileExists(" | ||
- | Set $InstallDir$ = " | ||
- | endif | ||
- | |||
- | if FileExists(" | ||
- | Set $InstallDir$ = " | ||
- | endif | ||
- | |||
- | Set $UninstallProgram$ = "" | ||
- | |||
- | ;-- is uninstall (delsub.ins) only supposed to run, when the UninstallProgramm exists? | ||
- | Set $CheckUninstallProgram$ = " | ||
- | |||
- | ;-- if a license is required, fill in " | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ = " | ||
- | |||
- | ;-- MSI | ||
- | Set $MsiId$ = '' | ||
- | </ | ||
- | |||
- | === CLIENT_DATA\sub_properties.ins === | ||
- | <code winst> | ||
- | Comment "### Start of sub_properties.ins ###" | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- define the needed variables | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | DefVar $prop_create_desktop_shortcut$ | ||
- | DefVar $prop_serial_prefix$ | ||
- | DefVar $prop_serial_number$ | ||
- | DefVar $prop_serial_product_key$ | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- load the needed properties | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | Set $prop_create_desktop_shortcut$ = getProductProperty(" | ||
- | Set $prop_serial_prefix$ = getProductProperty(" | ||
- | Set $prop_serial_number$ = getProductProperty(" | ||
- | Set $prop_serial_product_key$ = getProductProperty(" | ||
- | |||
- | if ($prop_create_desktop_shortcut$ = " | ||
- | Set $prop_create_desktop_shortcut$ = " | ||
- | else | ||
- | Set $prop_create_desktop_shortcut$ = " | ||
- | endif | ||
- | |||
- | if ($prop_serial_prefix$ = " | ||
- | Set $prop_serial_prefix$ = "" | ||
- | else | ||
- | Set $prop_serial_prefix$ = " | ||
- | endif | ||
- | |||
- | if ($prop_serial_number$ = " | ||
- | Set $prop_serial_number$ = "" | ||
- | else | ||
- | Set $prop_serial_number$ = " | ||
- | endif | ||
- | |||
- | if ($prop_serial_product_key$ = " | ||
- | Set $prop_serial_product_key$ = "" | ||
- | else | ||
- | Set $prop_serial_product_key$ = " | ||
- | endif | ||
- | </ | ||
- | |||
- | === CLIENT_DATA\uninstall.ins === | ||
- | <code winst> | ||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | Comment "### Start of uninstall.ins ###" | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- Available variables in script (after prerequisites) | ||
- | ; ---------------------------------------------------------------- | ||
- | ;-- $WinVersion$ => | ||
- | ;-- $SystemType$ => | ||
- | ;-- $UserName$ => | ||
- | ;-- $UserSID$ => | ||
- | ;-- $UserContext$ => | ||
- | ;-- $ScriptMode$ => | ||
- | ;-- $OS$ => | ||
- | ;-- $NTVersion$ => | ||
- | ;-- $MsiId$ => | ||
- | ;-- $UninstallProgram$ => | ||
- | ;-- $LogDir$ => | ||
- | ;-- $ProductId$ | ||
- | ;-- $MinimumSpace$ => | ||
- | ;-- $InstallDir$ => | ||
- | ;-- $ExitCode$ => | ||
- | ;-- $LicenseRequired$ => | ||
- | ;-- $LicenseKey$ => | ||
- | ;-- $LicensePool$ => | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- set some variables | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | DefVar $fatalErrorOccured$ | ||
- | DefVar $run_delsub$ | ||
- | |||
- | Set $fatalErrorOccured$ = " | ||
- | Set $run_delsub$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- load the prerequisites | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | ;-- get the package information | ||
- | ; | ||
- | if ($fatalErrorOccured$ = " | ||
- | if FileExists(" | ||
- | Sub " | ||
- | else | ||
- | LogError " | ||
- | $faltalErrorOccured$ = " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | |||
- | ;-- gather basic data, like the windows version | ||
- | ; | ||
- | if ($fatalErrorOccured$ = " | ||
- | if FileExists(" | ||
- | Sub " | ||
- | else | ||
- | LogError " | ||
- | $fatalErrorOccured$ = " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | |||
- | ;-- gather product properties | ||
- | ; | ||
- | if ($fatalErrorOccured$ = " | ||
- | if FileExists(" | ||
- | Sub " | ||
- | else | ||
- | LogError " | ||
- | $fatalErrorOccured$ = " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; -- start the setup process | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | ;-- show the product picture | ||
- | ; | ||
- | if ($fatalErrorOccured$ = " | ||
- | if FileExists(" | ||
- | ShowBitmap " | ||
- | else | ||
- | LogError " | ||
- | endif | ||
- | endif | ||
- | |||
- | ;-- check if the Product needs a license key | ||
- | ; | ||
- | if ($LicenseRequired$ = " | ||
- | Sub_free_license | ||
- | endif | ||
- | |||
- | ;-- uninstall the product | ||
- | ; | ||
- | if ($fatalErrorOccured$ = " | ||
- | if $CheckUninstallProgram$ = " | ||
- | if FileExists($UninstallProgram$) | ||
- | Set $run_delsub$ = " | ||
- | else | ||
- | Set $run_delsub$ = " | ||
- | comment " | ||
- | endif | ||
- | else | ||
- | Set $run_delsub$ = " | ||
- | endif | ||
- | endif | ||
- | |||
- | if $run_delsub$ = " | ||
- | if FileExists(" | ||
- | Sub " | ||
- | else | ||
- | LogError " | ||
- | endif | ||
- | endif | ||
- | |||
- | [Sub_free_license] | ||
- | |||
- | if opsiLicenseManagementEnabled | ||
- | 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("", | ||
- | else | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | </ |