Hi,
I have been succesfully using innosetup to install my windows apps on Windows PCs.
But since last year, at the botttom of the build-script I get these warnings:
Warning: The [Setup] section directive “PrivilegesRequired” is set to “admin” but per-user areas (userdesktop) are used by the script. Regardless of the version of Windows, if the installation is running in administrative install mode then you should be careful about making any per-user area changes: such changes may not achieve what you are intending. See the “UsedUserAreasWarning” topic in help file for more information.
Warning: Constant “pf” has been renamed. Use “commonpf” instead or consider using its “auto” form.
Now, the script (at present innosetup-6.2.0) I have been using all these years is this (I set to Bold the two offending constants); unfortunatelly the [Run] section shows up bold: Anyway:
[Setup]
AppName=myappname
AppVerName=myappname 2.2.9
AppPublisher=mySoftware
AppPublisherURL=https://mywebsiteaddress
AppSupportURL=https://mywebsiteaddress
AppUpdatesURL=https://mywebsiteaddress
DefaultDirName={pf}\myappname 2.2.9
DefaultGroupName=myappname 2.2.9
VersionInfoVersion=1
AppId={{AF8A018F-2DB4-4932-91B6-4A644DF4C694}
AllowNoIcons=yes
OutputBaseFilename=myappSetup
Compression=lzma
ChangesAssociations=yes
ArchitecturesAllowed=x64
ArchitecturesInstallIn64BitMode=x64
MinVersion=10.0.15063
[Tasks]
Name: “desktopicon”; Description: “{cm:CreateDesktopIcon}”; GroupDescription: “{cm:AdditionalIcons}”; Flags: unchecked
Name: “quicklaunchicon”; Description: “{cm:CreateQuickLaunchIcon}”; GroupDescription: “{cm:AdditionalIcons}”; Flags: unchecked
[Files]
Source: “myappname Win\myappname.exe”; DestDir: “{app}”; Flags: ignoreversion
Source: “myappname Win*”; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: “myappname Win\myappname Libs*”; DestDir: “{app}\myappname Libs”; Flags: ignoreversion recursesubdirs createallsubdirs
Source: “myappname Win\myappname Resources*”; DestDir: “{app}\myappname Resources”; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons]
Name: “{group}\myappname”; Filename: “{app}\myappname.exe”
Name: “{group}{cm:UninstallProgram,myappname}”; Filename: “{uninstallexe}”
Name: “{userdesktop}\myappname”; Filename: “{app}\myappname.exe”; Tasks: desktopicon
[Run]
Filename: “{app}\myappname.exe”; Description: “{cm:LaunchProgram,myappname}”; Flags: nowait postinstall skipifsilent
Now, about Warning 1: "The [Setup] section directive “PrivilegesRequired” is set to “admin”.
But since my script does not contain such directive, I assume such directive is a default one. (I looked to the “UsedUserAreasWarning” topic in help file, but I did not get any light).
And about Warning 2: Constant “pf” has been renamed. Use “commonpf” instead or consider using its “auto” form.
Accordingly I made the two required changing like this :
[Setup]
DefaultDirName={commonpf}\myappname 2.2.9
[Icons]
Name: “{{admin}\myappname”; Filename: “{app}\myappname.exe”; Tasks: desktopicon
Now, although the new build-script runs without showing any warning and the .exe gets installed all right, I’d like to know from people more expert than me if the two changings are actually OK, or if I should modify them in a better way. Thank you.
Another old “problem” is that after installing my apps, when I click the Start button, at the top of the list of apps I see the “icons” of my newly installed apps, but running down the list, my apps appear as “a generic folder” while all the other apps show their icon.
Should I add anything else in the above script in order to see my apps-icon instead of the folder?
Suggestion welcome! Thank you.