This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
userspace:vmwaretoolswin [2013/02/25 09:21] bobzbobz |
userspace:vmwaretoolswin [2021/08/23 08:37] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== VMWare Tools 8.6.5 For Windows ====== | ====== VMWare Tools 8.6.5 For Windows ====== | ||
//Scripts and guide by Soren Birk// | //Scripts and guide by Soren Birk// | ||
+ | |||
+ | This package will check if the client is virtual, and if not then result in an isFatalError. | ||
I have only created a setup-script for this package, since i dont see a reason for uninstalling VMware-Tools. | 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$. | + | If you want an uninstall-package it should be fairly easy to create since the uninstall-file is located in the InstallDir. |
**Tested With:** | **Tested With:** | ||
Line 10: | Line 12: | ||
* Winst 4.11.3.3 | * Winst 4.11.3.3 | ||
* Windows 7, 32 and 64-Bit | * Windows 7, 32 and 64-Bit | ||
+ | |||
+ | **Instructions: | ||
+ | * (On a virtual host) mount VMware-disk by selecting: Guest -> Install/ | ||
+ | * Go to my computer and right-click on the virtual DVD-drive -> select " | ||
+ | * Copy all the files to vmwaretoolswin\CLIENT_DATA | ||
**Tree:** | **Tree:** | ||
Line 20: | Line 27: | ||
└ Program Files | └ 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 | ||
+ | isFatalError "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 | ||
</ | </ |