This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Chicken and egg problem
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 12, 2008
01:09 PM
Require users to run setup.exe when trying to launch msi
Hi,
I have a basic msi created with InstallShield 2008. When a user tries to launch the msi directly, is there a way to display a message saying that they have to run setup.exe? I noticed in the string table that there's a string called IDS_STANDARD_USE_SETUPEXE that reads:
This installation cannot be run by directly launching the MSI package. You must run setup.exe.
Any help is greatly appreciated.
Thanks,
loralynne
I have a basic msi created with InstallShield 2008. When a user tries to launch the msi directly, is there a way to display a message saying that they have to run setup.exe? I noticed in the string table that there's a string called IDS_STANDARD_USE_SETUPEXE that reads:
This installation cannot be run by directly launching the MSI package. You must run setup.exe.
Any help is greatly appreciated.
Thanks,
loralynne
(16) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 12, 2008
01:29 PM
I believe that message is used by InstallScript MSI packages (which do require setup.exe), but perhaps see this newsletter tip for one possible approach (PDF warning): http://www.acresso.com/webdocuments/PDF/msisetup.pdf.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎May 12, 2008
01:39 PM
Great! Thanks for the quick response, Robert!
-loralynne
-loralynne
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 06, 2009
05:21 PM
Hi Robert,
I know it's been several months since I first posted this thread. I implemented your solution, and it works fine when setup.exe is launched by double-clicking on it or when it's launched via command line without any passing any arguments to the msi (i.e., without using /v). However, if the user launches setup.exe via command line and passes in arguments to the msi, the command line arguments in Setup.ini are ignored/overwritten.
For example, even though I specify USER_LAUNCHED_SETUPEXE=1 in the MSI Command Line Arguments property of my ism, running the following via command line will display my "setup.exe required" dialog:
setup.exe /v/qn
Is there a way to not have the command line arguments specified in setup.ini overwritten? I don't want to require the user to set the USER_LAUNCHED_SETUPEXE property on the command line.
Thanks,
Lora
I know it's been several months since I first posted this thread. I implemented your solution, and it works fine when setup.exe is launched by double-clicking on it or when it's launched via command line without any passing any arguments to the msi (i.e., without using /v). However, if the user launches setup.exe via command line and passes in arguments to the msi, the command line arguments in Setup.ini are ignored/overwritten.
For example, even though I specify USER_LAUNCHED_SETUPEXE=1 in the MSI Command Line Arguments property of my ism, running the following via command line will display my "setup.exe required" dialog:
setup.exe /v/qn
Is there a way to not have the command line arguments specified in setup.ini overwritten? I don't want to require the user to set the USER_LAUNCHED_SETUPEXE property on the command line.
Thanks,
Lora
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2009
01:28 PM
Robert? Anyone? Please? Any help would be greatly appreciated.
Thanks,
Lora
Thanks,
Lora
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2009
01:43 PM
You may try using the SETUPEXEDIR property instead of a custom property to account for MSI arguments passed via the setup.exe command line. SETUPEXEDIR will always be passed when launching from setup.exe.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Mar 12, 2009
02:20 PM
Thanks for your quick response, Josh! That solution works.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 22, 2009
06:17 PM
Personally, I think the fact that the MSI command line arguments you specify in Setup.ini are overwritten when the setup.exe /v option is used should be considered a bug for IS 2009. One of the new features in IS 2009 is the fact that you can pass multiple MSI command line arguments by using the "/v" option multiple times. IMHO, since that is the case in 2009 then the arguments I specify in Setup.ini should be the "first" "/v" and the user should still have the option to append MSI command line arguments using further "/v" options.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 22, 2009
06:21 PM
joshstechnij wrote:
You may try using the SETUPEXEDIR property instead of a custom property to account for MSI arguments passed via the setup.exe command line. SETUPEXEDIR will always be passed when launching from setup.exe.
Josh,
Are you positive this is the case (SETUPEXEDIR will ALWAYS be passed to the msiexec command line when launched via setup.exe)? There are no exceptions? :confused:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 18, 2009
06:01 PM
I'm resurrecting this thread for localization reasons. The default language in my ism file is English. When I launch my msi on a non-English machine, the "setup.exe must be launched" alert is still displayed in English even though the string is localized in my ism for each language my installer supports.
How do I get the correct language displayed in the alert?
I need to resolve this ASAP. Any help is greatly appreciated.
Thanks,
Lora
How do I get the correct language displayed in the alert?
I need to resolve this ASAP. Any help is greatly appreciated.
Thanks,
Lora
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 18, 2009
06:19 PM
You have a "chicken and egg" problem. To display the local language the MSI must be launched using the appropriate transform property on the command line: "msiexec.exe /i MyPackage.msi TRANSFORMS=1041.mst" (example for Japanese language ID=1041). But the setup.exe is what InstallShield uses to determine the language and launch the appropriate MSI command line.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 18, 2009
07:13 PM
Thanks, HookEm. So, you don't see any workaround for this?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 18, 2009
10:36 PM
Well, you'd need to write a custom action that could detect the system language (SystemLanguageID) and display a message in that language and then call the CA when you detect the MSI was not launched from the bootstrapper application.
If the languages your installation supports all use a common character set you might be able to just add a property to the property table for each language and write the required CA in JScript/VBScript and display the value of the property in a message box. I don't think that will work if you're default code page uses a single byte character set and the system language is double byte.
something like the VBScript example below for myLocalizedMsgCA and then call the CA when you detect the MSI was launched without running setup:
SysLang = property("SystemLanguageID")
Select Case SysLang
Case 1031 MsgBox property("MY_GERMAN_MSG")
Case 1036 MsgBox property("MY_FRENCH_MSG")
Case Else MsgBox property("MY_ENGLISH_MSG")
End Select
If the languages your installation supports all use a common character set you might be able to just add a property to the property table for each language and write the required CA in JScript/VBScript and display the value of the property in a message box. I don't think that will work if you're default code page uses a single byte character set and the system language is double byte.
something like the VBScript example below for myLocalizedMsgCA and then call the CA when you detect the MSI was launched without running setup:
SysLang = property("SystemLanguageID")
Select Case SysLang
Case 1031 MsgBox property("MY_GERMAN_MSG")
Case 1036 MsgBox property("MY_FRENCH_MSG")
Case Else MsgBox property("MY_ENGLISH_MSG")
End Select
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 19, 2009
04:01 PM
Thanks, HookEm! I'll give that a try.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 06, 2010
06:37 PM
Hi HookEm,
Using a VBscript custom action works, but I'll need to use a dll since I need to support double-byte as well as single-byte languages.
One thing though is that since a return code has be returned from the custom action to Windows installer, the "Setup Interrupted" dialog (I'm using the ERROR_INSTALL_USEREXIT return code) gets displayed, and it gets displayed in the installer's default language which I have set to English. Now, is there a way to avoid displaying THIS dialog?
Thanks again for your help.
Lora
Using a VBscript custom action works, but I'll need to use a dll since I need to support double-byte as well as single-byte languages.
One thing though is that since a return code has be returned from the custom action to Windows installer, the "Setup Interrupted" dialog (I'm using the ERROR_INSTALL_USEREXIT return code) gets displayed, and it gets displayed in the installer's default language which I have set to English. Now, is there a way to avoid displaying THIS dialog?
Thanks again for your help.
Lora
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 06, 2010
06:56 PM
That would be because the SetupInterrupted dialog is set to be displayed whenever USER_LAUNCHED_SETUPEXE is returned by a custom action.
You could try setting a property in your custom action code (something like SKIP_INTERRUPTED_DLG=1) and then changing the record in the InstallUISequence table that corresponds to the SetupInterrupted action so that it has a condition like:
The condition should cause the dialog to not get displayed.
You could try setting a property in your custom action code (something like SKIP_INTERRUPTED_DLG=1) and then changing the record in the InstallUISequence table that corresponds to the SetupInterrupted action so that it has a condition like:
NOT SKIP_INTERRUPTED_DLG
The condition should cause the dialog to not get displayed.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 06, 2010
07:08 PM
Thanks for the quick reply! I'll try that out.