I am looking for the option to create a URL link with Inno Setup on the desktop.
I need to call my web application with some parameters. Till now I was only able to create a shortcut to my application folder an my program, but how to create a URL link?
I think it must be solved in the Icons section?
[Icons]
Name: "{group}\MyAPP"; Filename: "{app}\MYPROG.EXE"; WorkingDir: "{app}"
Name: "{group}\App Logs"; Filename:"{commonappdata}\Foo\App\logfiles"; \
WorkingDir: "{commonappdata}\Foo\App\logfiles"
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"
Just set the Filename parameter to the URL:
Filename (Required)
...
In addition to file and folder names, URLs (web site addresses) may also be specified. When a URL is specified, Setup will create an "Internet Shortcut" (.url) file, and ignore the Parameters, WorkingDir, HotKey, and Comment parameters.
Example:
[Icons]
Name: "{autodesktop}\Web"; Filename: "https://www.example.com/"
Internet shortcuts must be specified in INI section
[INI]
FileName={commondesktop}\MyShortcutName.url,Section:InternetShortcut;Key:URL;String: Http://MyShortcutName.com
Related
I have made an exe file with Python and now I am trying to make an installer for it. I want to add a command in Inno Setup so after the installation it creates a shortcut to a folder in the installed directory (program folder/mixes). I want the shortcut to be on the desktop. I understand that you do it in the [Icons] sections but the examples I found were making a shortcut to an exe file but I want to make a shortcut to a folder. How do I do that? below is the Inno code:
#define MyAppName "Blender"
#define MyAppVersion "1.5"
#define MyAppExeName "Blender.exe"
[Setup]
AppName={#MyAppName}
AppVersion={#MyAppVersion}
DefaultDirName={autopf}\Cybercrete
DisableProgramGroupPage=yes
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; \
GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Dirs]
Name: "{app}"; Permissions: users-full
[Files]
Source: "C:\CyberCrete\Ver 1.5\Output\Blender\{#MyAppExeName}"; DestDir: "{app}"; \
Flags: ignoreversion
...
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; \
Tasks: desktopicon
Name: "{commondesktop}\Setup"; Filename: "{app}\Setup.exe"; \
WorkingDir: "{pf}\Program"; IconFilename: "{app}\Setup.ico"
[Run]
Filename: "{app}\{#MyAppExeName}"; \
Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; \
Flags: nowait postinstall skipifsilent`
I read many forums but they are about making shortcuts to exe files not folders.
Creating a shortcut to a folder is the same as creating shortcut to a file. Just use the path to the folder as the shortcut target:
[Icons]
Name: "{autodesktop}\My Folder"; Filename: "{app}\My Documents"
Though indeed, you should not store user's documents into app installation folder. Use user's Documents folder or application data folder.
Granting users full permissions to the program's installation folder is an equally bad practice.
Seems like this link explains everything you should need to know about creating shortcuts.
My program makes PDF files as output in a folder called "mixes". I
want to make it easier for the users to access the folder, that's why
I want to make a shortcut to the result folder.
I would highly recommend not to make the output folder in a relative folder in the program files (i.e. in a folder that is located in a location that is based on where the program is installed). This is both not easily found and will often need Admin permissions to write to a folder stored there.
I would recommend placing the folder in Documents (assuming this is Windows) or in AppData, which would make the folder both more easily accessible and will not run into permission issues.
Under the [Run] section I want to change the working directory to the directory from which the installer was executed. For example, if the setup was executed from the Desktop, I want the working directory to point to the Desktop:
Filename: "{app}\setup.exe"; WorkingDir: "{app}"; MinVersion: 0.0,6.0; Flags: skipifsilent
Use the {src} constant. The documentation describes it as:
{src}
The directory in which the Setup files are located. For example: If
you used {src}\MYPROG.EXE on an entry and the user is installing from
"S:\", Setup will translate it to "S:\MYPROG.EXE".
In your case you can use it like:
[Run]
Filename: "{app}\setup.exe"; WorkingDir: "{src}"; MinVersion: 0.0,6.0; Flags: skipifsilent
I have a setup script which allows the user to specify a relative path where the application will save some files and folders. The path will be saved to a config.ini file. Till then everything works as expected.
Now I want the uninstaller to perform a removing of all content under the specified path. In my installer script I have a variable
var DataPath : String;
which holds the path.
To perform the removing I added the following lines of code (as mentioned on their website) to my script:
[UninstallDelete]
Type: filesandordirs; Name: DataPath
Unfortunately this doesn't work. Does anyone know how to do this?
My [INI] sections look like the following:
[INI]
Filename: "{app}\config.ini"; Section: "connection = standard"; \
Key: datapath; String: {code:GetDataPath}
Use {code:GetDataPath} in the [UninstallDelete], the same way you use it in the [INI] section:
[UninstallDelete]
Type: filesandordirs; Name: {code:GetDataPath}
I am using the following lines to create icons:
Name: "{group}\<PRODUCTNAME>"; Filename: "{app}\<PRODUCTEXENAME>"
Name: "{group}\<PRODUCTNAME> (Log Mode)"; Filename: "{app}\<PRODUCTEXENAME>"; Parameters: "/log"
Name: "{group}\{cm:ProgramOnTheWeb,<PRODUCTNAME>}"; Filename: "{app}\<PRODUCTNAME>.url"
Name: "{group}\{cm:UninstallProgram,<PRODUCTNAME>}"; Filename: "{uninstallexe}"
Name: "{userdesktop}\<PRODUCTNAME>"; Filename: "{app}\<PRODUCTEXENAME>";
Name: "{commondesktop}\<PRODUCTNAME>"; Filename: "{app}\<PRODUCTEXENAME>"; WorkingDir: "{app}"
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\<PRODUCTNAME>"; Filename: "{app}\<PRODUCTEXENAME>";WorkingDir:"{app}"
I guess I just did a mistake where I place a desktop icon twice.
Does anybody see where my mistake is?
You create 1 icon for Current User {userdesktop} and 1 icon for All Users {commondesktop}. After installation if you would log on to another account you would see only {commondesktop} one.
You should choose only 1 of those 2, which corresponds to your application behavior. If your application should work for every user on the computer, you should choose the {commondesktop}, but if it is intended to work only for User who installed the application, you should choose {userdesktop}.
hi i am havinf trouble with icons,on the setup part i have got this:
UninstallDisplayIcon="X:\Design\IdOntime\icon_ontime.ico"
this icon is in a server, and i can reach the server folder in a mapped drive, in this case x:.
So this is saying where the uninstall icon is, and when i run setup the uninstall icon appear correclty.
Now moving to the icons on the desktop and the init menu..
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "X:\Design\IdOntime\icon_ontime.ico"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon; IconFilename: "X:\Design\IdOntime\icon_ontime.ico"
i am using the same path, but this time instead of the icon , it appears a blank page. What i can understant is that the windows didnt find the icon so it is puting a default icon.
what is even more stange is that if i change the path of the icon to a local path, it works.
so does inno setup icons section doenst like mapped path?
thanks in advance..