This shows you the differences between two versions of the page.
userspace:vmwaretoolswin [2013/02/25 09:32] bobzbobz |
userspace:vmwaretoolswin [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== VMWare Tools 8.6.5 For Windows ====== | ||
- | //Scripts and guide by Soren Birk// | ||
- | I have only created a setup-script for this package, since i dont see a reason for uninstalling VMware-Tools. | ||
- | |||
- | If you want an uninstall-package it should be fairly easy to create since the uninstall-file is located in the InstallDir. | ||
- | |||
- | **Tested With:** | ||
- | * OPSI 4.0.2.4 | ||
- | * Winst 4.11.3.3 | ||
- | * Windows 7, 32 and 64-Bit | ||
- | |||
- | **Tree:** | ||
- | < | ||
- | ├ setup3264.ins | ||
- | ├ setup.exe | ||
- | ├ setup64.exe | ||
- | ├ vmwaretoolslogo.png | ||
- | ├ manifest.txt | ||
- | └ Program Files | ||
- | └ < | ||
- | </ | ||
- | |||
- | ==== setup3264.ins ==== | ||
- | <code winst> | ||
- | ; Author Soren Birk | ||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | |||
- | DefVar $LogDir$ | ||
- | DefVar $ProductId$ | ||
- | DefVar $MinimumSpace$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $LicenseRequired$ | ||
- | DefVar $LicenseKey$ | ||
- | DefVar $LicensePool$ | ||
- | DefVar $INST_SystemType$ | ||
- | DefVar $INST_architecture$ | ||
- | DefVar $PCModel$ | ||
- | DefStringList $list$ | ||
- | |||
- | Set $INST_SystemType$ = GetSystemType | ||
- | set $INST_architecture$ = GetProductProperty(" | ||
- | Set $list$ = getOutStreamFromSection(" | ||
- | Set $PCModel$ = takeFirstStringContaining($list$," | ||
- | |||
- | Set $LogDir$ = " | ||
- | |||
- | ; ---------------------------------------------------------------- | ||
- | ; - Please edit the following values | ||
- | ; ---------------------------------------------------------------- | ||
- | Set $ProductId$ | ||
- | Set $MinimumSpace$ | ||
- | Set $LicenseRequired$ = " | ||
- | Set $LicensePool$ | ||
- | ; ---------------------------------------------------------------- | ||
- | |||
- | if not(HasMinimumSpace (" | ||
- | LogError "Not enough space on %SystemDrive%, | ||
- | isFatalError "Ikke nok plads" | ||
- | else | ||
- | comment " | ||
- | ShowBitmap " | ||
- | |||
- | if contains($PCModel$, | ||
- | |||
- | if $LicenseRequired$ = " | ||
- | comment " | ||
- | Sub_get_licensekey | ||
- | endif | ||
- | |||
- | if (($INST_SystemType$ = "x86 System" | ||
- | Message " | ||
- | comment "Start setup-program" | ||
- | ChangeDirectory " | ||
- | Winbatch_install_32 | ||
- | Sub_check_exitcode | ||
- | |||
- | ExitWindows /Reboot | ||
- | endif | ||
- | |||
- | if ($INST_SystemType$ = "64 Bit System" | ||
- | Message " | ||
- | comment "Start setup-program" | ||
- | ChangeDirectory " | ||
- | Winbatch_install_64 | ||
- | Sub_check_exitcode | ||
- | |||
- | ExitWindows /Reboot | ||
- | endif | ||
- | else | ||
- | Message "The Computer doesnt seem to be virtual, installation will be skipped." | ||
- | endif | ||
- | endif | ||
- | |||
- | [Winbatch_install_32] | ||
- | " | ||
- | |||
- | [Winbatch_install_64] | ||
- | " | ||
- | |||
- | [DosInAnIcon_getmodel] | ||
- | wmic computersystem get model | ||
- | |||
- | [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 "Error class: " + $ServiceErrorClass$ | ||
- | |||
- | if $ServiceErrorClass$ = " | ||
- | comment " | ||
- | else | ||
- | if $ServiceErrorClass$ = " | ||
- | LogError " | ||
- | LogError getLastServiceErrorMessage | ||
- | isFatalError | ||
- | else | ||
- | if $ServiceErrorClass$ = " | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | endif | ||
- | endif | ||
- | else | ||
- | LogError " | ||
- | isFatalError | ||
- | 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 | ||
- | </ |