how to display please wait dialog while EXEC() runs another application silently.
You can use a ProgressOutputWizardPage, which works just fine for me, which isn't exactly complicated. You can refer to the CodeDlg.iss example.
Do you really need it to be a message box? As you might know, you can run an external *.exe during setup, and have a custom status message shown meanwhile. (The status message will be on the usual progress label during installation.)
I have a setup.exe that installs product A. This setup.exe contains a setup2.exe file, used to setup product B. setup.exe copies setup2.exe to the Program Files folder during the installation of product A. When all files have been copied, setup.exe then starts setup2.exe in the background. To accomplish this, i have done
[Run]
Filename: "{app}\setup2.exe"; StatusMSG: "Installing Product 2..."; Parameters: "/VERYSILENT /SUPPRESSMSGBOXES"
in setup.iss (that compiles to setup.exe). setup2.exe is also an Inno Setup installer, so the parameters "/VERYSILENT /SUPPRESSMSGBOXES" will make the installation of product 2 silent. During this setup, setup.exe will show the message "Installing Product 2...".
If you really need a message box to popup with the status message, you'll have to resort to Pascal scripting.
Related
I have search for almost 2 days including going through regular documentation for inno setup. But I have not found a way for Inno setup to sequentially execute other uninstallers (3rd party apps), as items in the [UninstallRun] section. Since the other uninstallers are "cloned" the "waituntilterminated" flag doesn't work on those uninstallers. Has anyone come up with a way to accomplish this?
Thanks,
David
If the other uninstallers are Inno Setup-made, then I do not think you need to do anything special.
Inno Setup-made uninstaller really clones itself and run its clone internally. But it waits for the clone to actually complete the uninstallation before it closes itself. The only thing, that the clone does after the main uninstaller processes closes, is that it deletes the uninstaller executable (and its data files). I do not think you really need to wait for this to done. But if you do, just wait for the uninstaller files to be gone, before you proceed with the other uninstaller.
With Inno Setup it is possible to add user defined command line parameters. When I use the /?, /HELP command the user defined parameters are not listed there. How can I add my commands with a description to the /?, /HELP window?
Inno Setup 6.0 supports HelpTextNote message, whose contents will be inserted into the /HELP box.
In older versions:
You cannot.
The help text is hard-coded and not customizable in any way. It's not even localized.
It is even displayed before any Pascal Script code (InitializeSetup) is executed, so there's even no room to install some fancy hook to modify the message box on runtime.
See the ShowHelp function in the SetupLdr.dpr.
All you can do is to implement a custom switch (e.g. /usage) and handle it in the InitializeSetup event function.
Or, of course, you can modify Inno Setup source code and re-compile it. It's open source.
A related question: Is it possible to accept custom command line parameters with Inno Setup
I am trying to automate the install of a few setup files (.exe). I managed to get one working without any issue but am having difficulty with the second.
I created response files by using the following in command prompt:
MyProgram.exe -r
This generated a "setup.exe" file in C:\Windows as I would expect it to. Here is an example of what the file looks like in notepad:
[{PRODUCT_GUID}-DlgOrder]
Dlg0={PRODUCT_GUID}-SdWelcome-0
Count=5
Dlg1={PRODUCT_GUID}-SdLicense-0
Dlg2={PRODUCT_GUID}-SdAskDestPath-0
Dlg3={PRODUCT_GUID}-SdSelectFolder-0
Dlg4={PRODUCT_GUID}-SdStartCopy-0
[{PRODUCT_GUID}-SdWelcome-0]
Result=1
[{PRODUCT_GUID}-SdLicense-0]
Result=1
[{PRODUCT_GUID}-SdAskDestPath-0]
szDir=C:\Example\
Result=1
[{PRODUCT_GUID}-SdSelectFolder-0]
szFolder=Example\Folder
Result=1
[{PRODUCT_GUID}-SdStartCopy-0]
Result=1
I run the install with the setup.iss (response file) using the command:
program.exe /S /f1.\setup.iss
All response files seem to work except for one. The program opens a dialog asking me to select from a pair of radio buttons to select what language manual I want it to install. I want it to default to hit the "Next" button but there's obviously nothing recorded in the .iss file to do so.
What do I have to manually add to the .iss file in order to complete this prompt?
Why doesn't my recording put this in?
Additional information:
If I manually hit "Next" at this step, the program completes install as expected.
The program successfully installs when I install everything manually.
It sounds like this installation includes a custom dialog that doesn't properly handle either MODE SILENTMODE or RECORDMODE. For silent installations to work properly, it needs to call SilentWriteData and SilentReadData when appropriate.
If you are the author of this installation (whether original or inherited), you should handle this case. If you are not the author and are trying to install this installation silently, you should contact the vendor, or (as Glytzhkof suggests) ask on a more relevant site for workarounds.
I think the response file will only contain the actual answers that were input during the original response file creation session. Did this missing dialog show up during the original setup run? Reboot dialogs and rare to display dialogs are often missing from the response file.
It could also be that the missing dialog is a custom made dialog and not a built-in Installshield dialog. I suppose this could mean it doesn't behave in the standard way.
How complex is this setup? How many systems are you deploying to? To reliably deploy files like these it is common to use "setup capture" and repackage as MSI files - so called application repackaging.
Depending on how many setups you have, how important they are and how many machines they need to reliably work on it might be worth capturing them. This is a highly complex task at times, but yield more reliable deployment once done right. Personally I find the biggest benefit of repackaging is the availability of a reliable uninstall - provided you have cleaned up the capture properly. Otherwise you have to create response files for the uninstall too. Very clunky and error prone - even when done well.
You might want to take this discussion to serverfault.com - the system administrator equivalent to stackoverflow.com. You can also have a look here: http://unattended.sourceforge.net/installers.php
Can InnoSetup execute a program before the uninstallation starts? My program creates some registry values. I have an executable that can remove those registry values and my question is, can InnoSetup run that executable before the uninstallation starts?
See the documentation on Setup Script Sections, particularly the UninstallRun one at the bottom of the tree:
[UninstallRun]
Filename: "{app}\INIT.EXE"; Parameters: "/x"
If you need to do something more complex, you can also do it in code using the Pascal scripting functionality in InnoSetup. See UninstallCodeExample1.iss' in theInnoSetup 5\Examples` folder.
I am trying to open a downloaded .exe file but it closes as soon as it opens. Is there any possible way so that I can open it for a longer duration to read the content.
It's probably a console application rather than a GUI application. Use the command prompt to run the .exe.
Do the following...
Hold down your Windows key on your keyboard and then tap "R".
This will bring up the Run dialog. Type in "cmd" (without the quotes). Hit enter.
(this will work in all Windows versions - browsing the start menu/screen differs in each version)
If you saved the file to c:\downloads and it's called myFile.exe, type
C:
cd C:\Downloads
myFile.exe
Some of the steps are a bit redundant - if you know what you're doing in the command prompt then skip as needed (but then you probably wouldn't be posting this question). This will work even if you saved the file to D:\downloads.
Another example - if you saved the file to D:\folderA\Folder with a space\ and the file is called "my file with a space.exe" then type
D:
cd "D:\folderA\Folder with a space"
"my file with a space.exe"
If there is an issue (eg it's a 64-bit executable and you're on 32-bit Windows) then you may get a better error message at the command line.
There are so many reasons why the executable does not run. Here are some ways to check what is going wrong:
Is it your .exe? Do you known the "normal" behavior?
When you download it manually, it the result the same?
Do you download the .exe manually or via your application?
Do you see any problem in your Windows Event Viewer?
Is it the same result if you try to download the .exe via different browsers (IE, FF, ...)?
More details are welcome!
The nuget.exe file is not a console GUI application but rather a console package. Once you've downloaded it, you'll want to place it in a folder outside your Downloads folder. For example, C:\NuGet\nuget.exe - then set it as a PATH variable so that it's executable from anywhere.