msiexec error codes

taken from http://www.msierrors.com/tag/1618/

 

[expand title=”msiexec codes”]

VALUE RETURNED
ERROR CODE
ERROR DESCRIPTION
SOLUTION
0
ERROR_SUCCESS
Action completed successfully.
Nothing to be done
13
ERROR_INVALID_DATA
The data is invalid
87
ERROR_INVALID_PARAMETER
One of the parameters was invalid.
1601
ERROR_INSTALL_SERVICE_FAILURE
The Windows Installer service could not be accessed. Contact your support personnel to verify that the Windows Installer service is properly registered.
There’s a problem with the Windows Installer Service. It might happen after a KB that affects it has just been installed. Solution: Restarting the machine usually solves the problem.
1602
ERROR_INSTALL_USEREXIT
User cancel installation.
The user has cancelled the installation. Solution: just don’t cancel it
1603
ERROR_INSTALL_FAILURE
Fatal error during installation.
It’s the most common error code. It means something is wrong with the package.
1604
ERROR_INSTALL_SUSPEND
Installation suspended, incomplete.
1605
ERROR_UNKNOWN_PRODUCT
This action is only valid for products that are currently installed.
This happens when you try to uninstall/repair an MSI using its product code. Solution: Check if the product is installed first. For example, the existance of HKCRInstallerProductshash corresponding key
1606
ERROR_UNKNOWN_FEATURE
Feature ID not registered.
1607
ERROR_UNKNOWN_COMPONENT
Component ID not registered.
1608
ERROR_UNKNOWN_PROPERTY
Unknown property.
1609
ERROR_INVALID_HANDLE_STATE
Handle is in an invalid state.
1610
ERROR_BAD_CONFIGURATION
The configuration data for this product is corrupted. Contact your support personnel.
1611
ERROR_INDEX_ABSENT
Component qualifier not present.
1612
ERROR_INSTALL_SOURCE_ABSENT
The installation source for this product is not available. Verify that the source exists and that you can access it.
1613
ERROR_INSTALL_PACKAGE_VERSION
This installation package cannot be installed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
1614
ERROR_PRODUCT_UNINSTALLED
Product is uninstalled.
1615
ERROR_BAD_QUERY_SYNTAX
SQL query syntax invalid or unsupported.
1616
ERROR_INVALID_FIELD
Record field does not exist.
1618
ERROR_INSTALL_ALREADY_RUNNING
Another installation is already in progress. Complete that installation before proceeding with this install.
This happens when you try to install a product while another installation is in progress. Solution: Wait until the previous installation is finished.
1619
ERROR_INSTALL_PACKAGE_OPEN_FAILED
This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package.
Either the file (MSI) doesn’t exist, or it’s being locked for editing (by tools such as Orca, insted, etc). Solution: Check the location and make sure no process holds it locked.
1620
ERROR_INSTALL_PACKAGE_INVALID
This installation package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer package.
1621
ERROR_INSTALL_UI_FAILURE
There was an error starting the Windows Installer service user interface. Contact your support personnel.
1622
ERROR_INSTALL_LOG_FAILURE
Error opening installation log file. Verify that the specified log file location exists and is writable.
Solution: Make sure you have the permissions to write to the log file. Or change its location.
1623
ERROR_INSTALL_LANGUAGE_UNSUPPORTED
This language of this installation package is not supported by your system.
1624
ERROR_INSTALL_TRANSFORM_FAILURE
Error applying transforms. Verify that the specified transform paths are valid.
Solution: Make sure the path to the MST is correct.
1625
ERROR_INSTALL_PACKAGE_REJECTED
This installation is forbidden by system policy. Contact your system administrator.
1626
ERROR_FUNCTION_NOT_CALLED
Function could not be executed.
1627
ERROR_FUNCTION_FAILED
Function failed during execution.
1628
ERROR_INVALID_TABLE
Invalid or unknown table specified.
1629
ERROR_DATATYPE_MISMATCH
Data supplied is of wrong type.
1630
ERROR_UNSUPPORTED_TYPE
Data of this type is not supported.
1631
ERROR_CREATE_FAILED
The Windows Installer service failed to start. Contact your support personnel.
1632
ERROR_INSTALL_TEMP_UNWRITABLE
The temp folder is either full or inaccessible. Verify that the temp folder exists and that you can write to it.
1633
ERROR_INSTALL_PLATFORM_UNSUPPORTED
This installation package is not supported on this platform. Contact your application vendor.
1634
ERROR_INSTALL_NOTUSED
Component not used on this computer.
1635
ERROR_PATCH_PACKAGE_OPEN_FAILED
This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer patch package.
1636
ERROR_PATCH_PACKAGE_INVALID
This patch package could not be opened. Contact the application vendor to verify that this is a valid Windows Installer patch package.
1637
ERROR_PATCH_PACKAGE_UNSUPPORTED
This patch package cannot be processed by the Windows Installer service. You must install a Windows service pack that contains a newer version of the Windows Installer service.
1638
ERROR_PRODUCT_VERSION
Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs in Control Panel.
1639
ERROR_INVALID_COMMAND_LINE
Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.
1640
ERROR_INSTALL_REMOTE_DISALLOWED
Installation from a Terminal Server client session not permitted for current user.
1641
ERROR_SUCCESS_REBOOT_INITIATED
The installer has started a reboot.
1642
ERROR_PATCH_TARGET_NOT_FOUND
The installer cannot install the upgrade patch because the program being upgraded may be missing, or the upgrade patch updates a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch.
3010
ERROR_SUCCESS_REBOOT_REQUIRED
A restart is required to complete the install. This does not include installs where the ForceReboot action is run.

[/expand]

Windows Registry Key Permissions

To take change ownership of registry keys in Windows use of the regini.exe tool seems simplest.

[expand title=”MS KB 245031 describes using a script that regini.exe calls to execute, basically just the registry key referenced in a text file:”]

Install the latest version of the Windows NT Server 4.0 Resource Kit.
Create a script file that contains the change commands:
Start any text editor (such as Notepad).
Type the registry keys and the appropriate permissions in the following format
Registryhivekey [permissions]
where hive is the name of the registry hive, key is the name of the registry key, and [permissions] is the binary number format of the permissions. 

For example, to modify the HKEY_LOCAL_MACHINESoftware registry key to give the Administrators group and the Creator/Owner group Full Control permission and the Everyone group Read permission, type the following string:
RegistryMachineSoftware [1 5 8]
NOTE: You must type the permissions in the binary number format. You must also refer to the registry hive in the predefined format. For more information about how to refer to a registry hive in a script file and about the binary numbers for various types of permissions, refer to the 'Reference to Registry Hives and Binary Number Representation for Permissions' section in this article.
Save and then close the script file.
Type the following command at a command prompt, and then press ENTER
REGINI [-m \computername] scriptname
where computername is the name of the computer and scriptname is the name of the script file you just created. 

NOTE: Use the -m option only when you edit the registry of a remote computer. Be sure to include the entire path to the script file.
Reference to Registry Hives and Binary Number Representation for Permissions 

Refer to registry hives as indicated below:
  HKEY_LOCAL_MACHINE - RegistryMachine
  HKEY_USERS - RegistryUsers
  HKEY_CURRENT_USER - RegistryUserUser_SID (where User_SID is the current user's security identifier)

[/expand]

http://support.microsoft.com/Default.aspx?kbid=245031

 

[expand title=”MS KB 237607 describes permissions levels:”]

 1  - Administrators Full Access
 2  - Administrators Read Access
 3  - Administrators Read and Write Access 
 4  - Administrators Read, Write and Delete Access
 5  - Creator Full Access
 6  - Creator Read and Write Access
 7  - World Full Access
 8  - World Read Access
 9  - World Read and Write Access
 10 - World Read, Write and Delete Access
 11 - Power Users Full Access
 12 - Power Users Read and Write Access
 13 - Power Users Read, Write and Delete Access
 14 - System Operators Full Access
 15 - System Operators Read and Write Access
 16 - System Operators Read, Write and Delete Access
 17 - System Full Access
 18 - System Read and Write Access
 19 - System Read Access
 20 - Administrators Read, Write and Execute Access
 21 - Interactive User Full Access
 22 - Interactive User Read and Write Access
 23 - Interactive User Read, Write and Delete Access

[/expand]

http://support.microsoft.com/?kbid=237607

 

PXELinux Windows PE

The following batch file describes the creation of a Win7 PE boot environment and generates an ISO that is then bootable. For our needs we use PXELinux so note the echo in the batch file” echo Preparing peimagexfiles” below.

[expand title=”Customized PE Creation batch file”]


@echo off

set PEHOME=C:ITWAIK
set PEROOT=%PEHOME%_Mounts
set DRIVERSRC=%PEHOME%_SharedDrivers
set APPSRC=C:ITWAIK_SharedApplications

call "%PEHOME%_ProjectsWin7PEx86Environment2_create_winpe_imagepemount.bat"

rem dism seems to have a hissy fit with this in the command line so lets just do it first and use relative paths
rem (now fixed, but will leave as is)
cd /D "%PEHOME%"
cd ToolsPEToolsx86WinPE_FPs

echo Adding required components
dism /image:"%PEROOT%Mount" /add-package /packagepath:"%PEHOME%ToolsPEToolsx86WinPE_FPsWinPE-Scripting.cab"
dism /image:"%PEROOT%Mount" /add-package /packagepath:"%PEHOME%ToolsPEToolsx86WinPE_FPsWinPE-HTA.cab"
dism /image:"%PEROOT%Mount" /add-package /packagepath:"%PEHOME%ToolsPEToolsx86WinPE_FPswinpe-wmi.cab"
dism /image:"%PEROOT%Mount" /add-package /packagepath:"%PEHOME%ToolsPEToolsx86WinPE_FPswinpe-wmi.cab"

rem Show installed packages
dism /image:"%PEROOT%Mount" /get-packages

echo Adding drivers
Call "%PEHOME%_Sharedwinpe_inject_basic_network_drivers.bat"
echo Adding local apps and scripts

xcopy /s/e/i/y "%APPSRC%ghost" "%PEROOT%MountApplications"
xcopy /s/e/i/y "%APPSRC%imagex.exe" "%PEROOT%MountApplications"

copy /Y "%PEHOME%_ProjectsWin7PEx86Environment2_create_winpe_imageStartnet.cmd" "%PEROOT%MountWindowsSystem32startnet.cmd"

cd /D "%PEROOT%"

rem Remove 'press any key to boot' message
del isobootbootfix.bin

echo Preparing peimagexfiles
rd /s/q "%PEROOT%peimagex"
mkdir "%PEROOT%peimagex"

mkdir %PEROOT%peimagexFonts
copy %PEROOT%mountwindowsbootpxebootmgr.exe %PEROOT%peimagex
copy %PEROOT%mountwindowsbootpxepxeboot.n12 %PEROOT%peimagexpxeboot.0
copy %PEROOT%mountwindowsbootfontswgl4_boot.ttf %PEROOT%peimagexFonts
copy "%PEHOME%ToolsPEToolsx86bootboot.sdi" %PEROOT%peimagex

echo off > %PEROOT%peimagexempty

echo Creating the boot file
set BCDStore=%PEROOT%peimagexBCD
bcdedit -createstore %BCDStore%
bcdedit -store %BCDStore% -create {ramdiskoptions} /d "Ramdisk options"
bcdedit -store %BCDStore% -set {ramdiskoptions} ramdisksdidevice Boot
bcdedit -store %BCDStore% -set {ramdiskoptions} ramdisksdipath Bootboot.sdi
for /f "Tokens=3" %%i in ('bcdedit /store %BCDStore% /create /d "Windows 7 Install Image" /application osloader') do set GUID=%%i
bcdedit -store %BCDStore% -set %GUID% systemroot Windows
bcdedit -store %BCDStore% -set %GUID% detecthal Yes
bcdedit -store %BCDStore% -set %GUID% winpe Yes
bcdedit -store %BCDStore% -set %GUID% osdevice ramdisk=[boot]Bootboot.wim,{ramdiskoptions}
bcdedit -store %BCDStore% -set %GUID% device ramdisk=[boot]Bootboot.wim,{ramdiskoptions}
bcdedit -store %BCDStore% -create {bootmgr} /d "Windows 7 Boot Manager"
bcdedit -store %BCDStore% -set {bootmgr} timeout 30
bcdedit -store %BCDStore% -set {bootmgr} displayorder %GUID%

call "%PEHOME%_ProjectsWin7PEx86Environment2_create_winpe_imagepeunmount.bat"
copy %PEROOT%ISOsourcesboot.wim %PEROOT%peimagex

rem echo Creating CD ISO image
oscdimg -betfsboot.com iso pex86.iso

xcopy /s/e/i/y "%PEROOT%peimagex" "%PEHOME%_ProjectsWin7PEx86Environmentpeimagex"
xcopy /s/e/i/y "%PEROOT%pex86.iso" "%PEHOME%_ProjectsWin7PEx86Environment"

cd "%PEHOME%_ProjectsWin7PEx86Environmentpeimagex"

rmdir %PEROOT%
mkdir %PEROOT%

[/expand]

MySQL Commands

Export:


mysqldump -u username -p database_name > dump.sql

Import:


mysql -u username -p database_name < dump.sql

Live export/duplication (note you may need to enter the password on the line for the mysql command):


mysql -uuser -ppassword -e 'DROP DATABASE test_db;'
mysql -uuser -ppassword -e 'CREATE DATABASE test_db;'
mysqldump -uuser -ppassword live_db | mysql -uuser -ppassword test_db;

 

VMWare vCLI Errors

Getting libxml2-related errors, log out and in to refresh the environment variable changes from the install and also ensure you’re running the command prompt as an Administrator (elevated).

Product: Sophos Anti-Virus — Error 1327.Invalid Drive: h:

Encountered this problem on my client, turns out it was caused by our domain registry redirect applying to the local Windows SYSTEM account profile as well which then meant any installations running as SYSTEM were unable to unpack correctly. Correcting all references in the following user key for SYSTEM solved the problem:


HKEY_USERSS-1-5-18SoftwareMicrosoftWindowsCurrentVersionExplorerUser Shell Folders

Equally worth looking in:


HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerUser Shell Folders