Inno Setup how to merge 2 different "send to" filenames?

1

In the [Icons] section I created 2 entries the first wil move any image to the "DropWall" folder, the second will launch my "InsideWallpaper.exe" using the same image:

Name: "{sendto}\FFStyled (I) set InsideWallpaper image";
Filename: "{app}\DropWall";
IconFilename: "{app}\FFDropWall.ico";
Tasks: sendtoicon

Name: "{sendto}\FFStyled (II) launch InsideWallpaper.exe";
Filename: "{app}\InsideWallpaper.exe";
IconFilename: "{app}\FFDropWall.ico";
Tasks: sendtoicon

all is working fine but I would prefer to create a single "send to" entry any Idea ?

frankell

Posted 2018-06-03T13:55:32.803

Reputation: 426

Answers

0

You need some sort of scripting to sort out the action, eg in cmd create the short-cut:-

Name: "{sendto}\FFStyled handle InsideWallpaper image";
Filename: "{app}\Wallpaper.cmd";
IconFilename: "{app}\FFDropWall.ico";
Tasks: sendtoicon

In {app}\Wallpaper.cmd put code such as:-

echo off
set app="{app}\DropWall"
if "%~dp1"=="{wallpaper}\" set app="{app}\InsideWallpaper.exe"
"%app%" "%1"

Here {sendto}, {app} and {wallpaper} represent the corresponding directories. Note that, even when there are surrounding quotes in the passed parameter %1, there aren't in the parsed drive / directory %~dp1, though there is a trailing back-slash.

For more information, type if /? and call /?, or see this link and this.

AFH

Posted 2018-06-03T13:55:32.803

Reputation: 15 470

first of all thanks for the nice editing any way I really prefer to find the solution using Inno Setup as I said the script is perfectly working but it will populate the user "send to" with 2 entries – frankell – 2018-06-03T16:34:30.087

I doubt you will be able to achieve that without getting the manufacturer to do it, unless there is an installation script you can modify, in which case you'll need the information above to know what modifications to make. – AFH – 2018-06-03T16:50:57.430