With Inno Setup, if we choose to keep the prompt dialog (DisableStartupPrompt=False) the displayed message is managed by the localization file with the reference SetupLdrStartupMessage. For instance in English locale file:
SetupLdrStartupMessage=This will install %1. Do you wish to continue?
By default the setup will replace %1 by the name of the application defined by the variable AppName. How to make the text display AppVerName instead ?
I would like to get the following text :
This will install MyApplicationName 4.1. Do you wish to continue?
The Pascal function InitializeSetup() is not a correct option for me for two reasons:
This section is called after the language selection, called itself after the startup prompt. I want to keep this first popup.
It imply to re-write as many custom message as language you manage.
Make the version be part of the message:
#define MyAppVer "4.1"
[Setup]
AppName=MyApplicationName
AppVersion={#MyAppVer}
[Messages]
SetupLdrStartupMessage=This will install %1 {#MyAppVer}. Do you wish to continue?
Related
I just download the latest 2011.1, and try to use "ant extgen" command to create a default extennsion, but meet following error:
Would anyone know how to deal with it?
extgen.xml:293: The following error occurred while executing this line:
extgen.xml:35: Source directory '${ext.develop.path}' for template 'training' does not exist.
Just run it again and it should work the second time.
There does seem to be a bug in the build scripts that has probably been there a while. I assume that ant extgen was the first thing you ran after unpacking. There is no config folder so the build script did this:
[input] No config folder was found at /path/to/hybris/config.
[input] Please choose the configuration template.
[input] Press [Enter] to use the default value ([develop], production)
and you chose develop
Unfortunately it stores your choice in a variable input.template which is the same name as used when later on the script asks you what extension template you want to base yours on. So the script sees that the variable already has a value and doesn't ask you:
[input] Please choose a template for generation.
[input] Press [Enter] to use the default value (commercewebservices, commercewebservicestests, yacceleratorfulfilmentprocess, yacceleratormarketplaceintegration, yacceleratorordermanagement, yacceleratorstorefront, yaddon, ybackoffice, ycommercewebservices, ycommercewebservicestest, ydocumentcart, [yempty], yhacext, yocc, yoccaddon, yocctests, ysapproductconfigaddon, ysmarteditmodule, yvoid, ywebservices)
It then tries to find a template extension develop and fails.
Running it the second time means your config folder is already generated and it correctly asks you which extension you want to base your extension on.
I created Inno Setup script, which works perfectly, but I wanted to change OutputDir to create the output file on my desktop. But instead of creating output file on desktop it was creating subfolder {userdesktop} at the same directory, where script is and output was inside.
I found solution so far, but I believe there should be better way. What am I missing?
; these attempts didn't work
[Setup]
OutputDir={userdesktop}
; some more attampts:
OutputDir=userdesktop
OutputDir=userdesktop:
OutputDir="{userdesktop}"
; this workaround worked for me
[Setup]
OutputDir=userdocs:..\Desktop
Constants like {userdesktop} are resolved on install time (on the target user's machine), not on compile time (on your development machine). So it makes no sense to use constants in compile-time only directive like OutputDir. And actually it's not possible to use them at all (as it's useless).
With the default user profile directory layout, use you can use the userdocs: prefix, as you did:
[Setup]
OutputDir=userdocs:..\Desktop
Though it's not a perfect solution, as the "Documents" folder can be moved by the user and then the userdocs:..\Desktop will not point to the desktop.
A more reliable solution is to use USERPROFILE environment variable using GetEnv preprocessor function:
[Setup]
OutputDir={#GetEnv('USERPROFILE')}\Desktop
Sometimes it happens, that some files of my application are used by some processes. For example, user opens application log, or something like that, and forgets to close it. This causes some errors while installing/upgrading/uninstalling. In such cases, I'd like to find out, what process is using file, and show user a message, indicating, that files are used.
Is it possible in Inno Setup to find out, what process prevents script from modifying file? At least, when I'm trying to do this in Code section.
The Inno Setup can automatically check, if the installed files are locked by some processes, and offer a user to close (and restart later) the applications automatically (since 5.5.0).
Make sure the CloseApplications directive is set to its default value yes.
Though by default, only *.exe,*.dll,*.chm files are checked. If you want to check also other or all other files, modify the CloseApplicationsFilter directive:
[Setup]
; default
CloseApplications=yes
; check all files
CloseApplicationsFilter=*.*
If you are installing some files by a code, use the RegisterExtraCloseApplicationsResources event function:
procedure RegisterExtraCloseApplicationsResources;
begin
RegisterExtraCloseApplicationsResource(
False, ExpandConstant('{userappdata}\My Program.log'));
end;
I need to check for the location of a file during program installation utilizing inno setup. I then need inno setup to use the location of that file in the "Filename" line to create a desktop ICON for program initialization. I have the code for the "Icons" option working fine with the exception of how to do the above.
Here is the line of code I am currently using;
Name: "{commondesktop}\SA - NH Bricscad V12"; Filename:"**c:\program files\septic assistant\new hampshire\support\**SA - NH Bricscad V12.exe"; IconFilename: "C:\Program Files\Septic Assistant\New Hampshire\Support\Bricscadlogo.ico"; Comment: "Septic Assistant the only Septic Design Program"
Hi-Lited section would be the path to the exe file that I need inno setup to search for.
Any assistance with this would be very much appreciated.
Bruce
Just use a {code:...} constant and corresponding [Code] function that returns the appropriate path for your [Icons] entry. You will probably also want to use a Check function to avoid installing the icon in the case that you cannot find the correct location.
Another option is to use a {reg:...} constant, assuming that the path you are trying to locate is specified somewhere in the registry (which is usually the case).
If the path is not already specified somewhere well-defined in the Registry when the other app is installed, and you don't have some other means to quickly identify where the other app is located (note that doing a global search of the user's HD is not a valid option), then you should add a page that prompts the user to enter the location themselves (which you can then verify that they have chosen the correct location). You can see examples of prompting the user for information and then doing something with that info in the CodeDlg.iss example included with Inno, and in the ISXKB wiki.
Is it possible to change the title bar of your installer using Inno Setup?
By default is:
AppName=My Program
and when you run the setup in the title bar appears:
Setup - My Program
Is it possible to hide the word "Setup"?
Add the following lines to your InnoSetup script file:
[Messages]
// define wizard title and tray status msg
// both are normally defined in innosetup's default.isl (install folder)
SetupAppTitle = Setup YourApplicationShortName
SetupWindowTitle = Setup - YourApplicationName YourApplicationVersion
This will modify the "title bar" and the "app title" in the tray.
I would suggest not modifying the default configuration in /innosetup/default.isl,
like Sertac Akyuz pointed out. Think of this file as fallback config.
If you don't define a setting, then the setting is taken from default.isl.
Just modify your file; not the default settings!
In the InnoSetup installation folder there's a default.isl file, open that file in a text editor, find the SetupWindowTitle entry and change the right side from Setup - %1 to only %1. Also repeat the process for additional languages you use in the setup, you'll find the matching '.isl' files in the 'Languages' folder.
If you want to change the caption of the main form, try this:
[code]
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpWelcome then
WizardForm.Caption := 'Welcome to My Program';
end;
It, unfortunately, will not change the "Setup" caption on the taskbar. Since this is a delphi application, you would need access to the Application global variable to change this effortless, but this object is not exposed to pascal script, and I don't know any way to do it directly. I think you can follow the #satuon advice to change it using windows messages.
A better solution (also if you want to make your iss setup file be correctly compilable on any computer) is to redefine the certain language string in Messages section after the definition of the Languages file.
For example:
[Languages]
Name: de; MessagesFile: compiler:Languages\German.isl
;Name: en; MessagesFile: compiler:Default.isl
[Messages]
WizardReady=I am ready.
Simple no Codes
[Messages]
SetupWindowTitle=Your Programme Name
You should be able to do that using Pascal scripting. Inno Setup allows you to call SendMessage and PostMessage from your Pascal section. Try to use that to send a WM_SETTEXT message to your window.