Archive: ExecWait not working (Vista?)


ExecWait not working (Vista?)
Hi,

I am trying to silently install a component from MySQL.com but it is not currently working or possibly even executing.

NSIS code..

SetOutPath "$TEMP"
File "F:\soft.deploy\mysql-connector-odbc-3.51.12-win32.msi"
ExecWait "$TEMP\mysql-connector-odbc-3.51.12-win32.msi /q"

I actually have a few things that are note being executed. Only thing I can think of, is NSIS is not compatibly with Vista.

Thanks In Advance.
Jared

ATTACHED: broken script


ATTACH: The full script
!define PRODUCT_NAME "Test Script"
!define PRODUCT_VERSION "1.2.9"
!define PRODUCT_PUBLISHER "xxxxx"
!define PRODUCT_WEB_SITE "http://www.xxxxxxxxxx.net.au"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\xxxxx.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

!include "MUI.nsh"

!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Setup.exe"
InstallDir "$PROGRAMFILES\Test Script"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show


;SetCompress off
;CRCCheck on


Section "MySQL ODBC Connector" SEC01

SetOutPath "$TEMP"
File "F:\soft.deploy\mysql-connector-odbc-3.51.12-win32.msi"
ExecWait "$TEMP\mysql-connector-odbc-3.51.12-win32.msi /q"
;Delete "$TEMP\mysql-connector-odbc-3.51.12-win32.msi"

SectionEnd

Section -AdditionalIcons
CreateShortCut "$SMPROGRAMS\Resort\Uninstall.lnk" "$INSTDIR\uninst.exe"
SectionEnd

Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\xxxxx.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\xxxxx.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd


Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd

Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
Abort
FunctionEnd

Section Uninstall

DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd


MSI files are not executables. You must use ExecShell or execute an executable that'd open the MSI file, like msiexec.exe.


Below some helpfull MSI info. I still have this in my script to add the same parameters to my NSIS installer as MSI supports.

Note that in 99% it is not NSIS that is the problem but the user written installer script. NSIS is used intensive by more people you can ever imagine. And sure they are interested in 100% Windows Vista compatibility of NSIS.

------------------------------
; TODO for MSI to NSIS compatibility:

;Parameter Description
;/i <package> or <product code> Use this format to install the product Othello:

;msiexec /i "C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\Othello\Trial Version\Release\DiskImages\Disk1\Othello Beta.msi"

;Product Code refers to the GUID that is automatically generated in the Product Code property of your product's project view.
;/f [p|o|e|d|c|a|u|m|s|v] <package> or <product code> Installing with the /f option will repair or reinstall missing or corrupted files.

;For example, to force a reinstall of all files, use the following syntax:

;msiexec /fa "C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\Othello\Trial Version\Release\DiskImages\Disk1\Othello Beta.msi"

;in conjunction with the following flags:
;p reinstalls a file if it is missing
;o reinstalls a file if it is missing or if an older version of the file is present on the user's system
;e reinstalls a file if it is missing or if an equivalent or older version of the file is present on the user's system
;c reinstalls a file if it is missing or if the stored checksum of the installed file does not match the new file's value
;a forces a reinstall of all files
;u or m rewrite all required user registry entries
;s overwrites any existing shortcuts
;v runs your application from the source and re-caches the local installation package

;/a <package> The /a option allows users with administrator privileges to install a product onto the network.
;/x <package> or <product code> The /x option uninstalls a product.
;/j [u|m] <package>
;/j [u|m] <package> /t <transform list>
;/j [u|m] <package> /g
;/j <language ID> Building with the /j <package> option advertises the components of your application on the end user's computer
;u advertises components only to the current user
;m advertises components to all users of the computer
;g specifies language ID
;t applies a transform to your advertised product
;Transforms allow the synchronization of applications across different languages. For example, if you upgrade the English version of your product, you could apply a transform to automatically upgrade the French version of your product.
;/L [i|w|e|a|r|u|c|m|p|v|+] <log file> Building with the /L option specifies the path to the log file—these flags indicate which information to record in the log file:
;i logs status messages
;w logs non-fatal warning messages
;e logs any error messages
;a logs the commencement of action sequences
;r logs action-specific records
;u logs user requests
;c logs initial user interface parameters
;m logs out-of-memory messages
;p logs terminal settings
;v logs the verbose output setting
;+ appends to an existing file
;* is a wildcard character that allows you to log all information (excluding the verbose output setting)

;/p <patch package> Building with the /p option applies a patch to an installed setup package. To patch an installed administrative image, combine this option with /a as shown:

;/p <patch package> /a <package>
;/q [n|b|r|f] The /q option is used to set the user interface level in conjunction with the following flags:
;q or qn creates no user interface
;qb creates a basic user interface
;The user interface settings below display a modal dialog box at the end of installation:
;qr displays a reduced user interface
;qf displays a full user interface
;qn+ displays no user interface
;qb+ displays a basic user interface

;/? or /h Either command displays Windows Installer copyright information
;/y <filename> This command calls the DllRegisterServer entry-point function of the DLL or OCX file specified in <filename>.
;/z <filename> This command calls the DllUnregisterServer entry-point function of the DLL or OCX file specified in <filename>.
;TRANSFORMS Use the TRANSFORMS command line parameter to specify any transforms that you would like applied to your base package. Your transform command line call might look something like this:

;msiexec /i "C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\Your Project Name\Trial Version\My Release-1\DiskImages\Disk1\ProductName.msi" TRANSFORMS="New Transform 1.mst"

;You can separate multiple transforms with a semicolon. Because of this, it is recommended that you do not use semicolons in the name of your transform, as the Windows Installer service will interpret those incorrectly.
;Properties All public properties can be set or modified from the command line. Public properties are distinguished from private properties by the fact that they are in all capital letters. For example, COMPANYNAME is a public property.

;To set a property from the command line, use the following syntax: PROPERTY=VALUE. If you wanted to change the value of COMPANYNAME, you would enter:

;msiexec /i "C:\<WindowsFolder>\Profiles\<UserName>\Personal\MySetups\Your Project Name\Trial Version\My Release-1\DiskImages\Disk1\ProductName.msi" COMPANYNAME="SuperNSIS"

;********************************************************************************************************************************************