rudim77
Posts: 1
Joined: Mon Oct 24, 2016 7:49 am

Cannot create desktop shortcut

Hi everyone

I need help please. When creating my installer , all works perfectly , from copying files from a remote destination to the local machine the installer is activated etc , but one thing I cannot get working is to have it create a desktop shortcut to a specific file in the installation folder.

Please help ?

Thanks in advance !
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Cannot create desktop shortcut

Hello and welcome to our forums!

Just to make sure you correctly configured your shortcut, in order to create a shortcut for an installed file on desktop you can go to "Files and Folders" page, right-click on the file, select "New shortcut to.." - "Installed file" and in the "New File Shortcut "dialog. In "Shortcut Folder" field from "Paths" section you should select "Desktop". To read more about this, I suggest you take a look at : Creating Shortcuts in the Files and Folders Page article.

If this is still of no help please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tedych
Posts: 4
Joined: Wed Jan 30, 2019 4:34 pm

Re: Cannot create desktop shortcut

Just testing today AI.
I can confirm 3 years later that this continues to be a problem - no shortcuts get created in Desktop folder nor Start Menu. If I create a shortcut to Documents, it gets created though.

Windows Server 2016, using Administrator account with UAC to minimum level. No matter if setting is "per machine if user is admin, per user otherwise" or "per user", or Run as admin or not.
I used another (free) script based installer to create a test installer, it works perfectly and can create all shortcuts with no issues on the same machine.
I like the GUI approach to create hassle-free installations but this seems unsurmountable issue. 3 years later. Which makes me pessimistic this post would have any outcome.
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: Cannot create desktop shortcut

Hello and welcome to our forums,

I have tested your scenario on a Windows Server 2016 clean virtual machine and everything worked as expected.

In order for me to further investigate this, could you please send me a copy of your .AIP file and a verbose log of the installation process (where the shortcut is not created) by e-mail at support at advancedinstaller dot com?

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tedych
Posts: 4
Joined: Wed Jan 30, 2019 4:34 pm

Re: Cannot create desktop shortcut

Hm, yes, after creating a brand new project with almost all defaults, without messing around with dialogs etc, it created an installer that creates all shortcuts (automatically).
The other test (that doesn't work) doesn't work on any Windows I tried (also virtual machines).
I have to see and compare what's different, there are many experiments I made with adding/removing dialogs. Maybe some dialog broke some 'link'. Definitely I'll dig some more before giving up.
tedych
Posts: 4
Joined: Wed Jan 30, 2019 4:34 pm

Re: Cannot create desktop shortcut

I'm sorry for another post but the tutorial about conditioning the installation of a shortcut by using the registry "hack" and conditioning the registry component does not work. Checkbox selected and the shortcut not installing on desktop. Using a new custom (empty) dialog with a checkbox, entered it in the Condition for the component, and no joy. This shortcut stuff... got on my nerves, things are too unfriendly and unintuitive and .. "workarounded".

Edit: Ok, Somehow it worked by itself. The start menu folder is still created even when the component with the start menu shortcut is not created (checkbox unchecked). Is this a bug or another side effect? When not creating start menu shortcut (any), how do we do so this folder is not created?
And is there a wy to skip creating the dummy registry value for the conditioned shortcut?
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: Cannot create desktop shortcut

Hello,
Edit: Ok, Somehow it worked by itself.
I am glad you got this working by yourself.
The start menu folder is still created even when the component with the start menu shortcut is not created (checkbox unchecked)
This should not happen if you have configured it well. Could you please send me the .AIP file (project file) by e-mail at support at advancedinstaller dot com so I can investigate its settings?
And is there a way to skip creating the dummy registry value for the conditioned shortcut?
I am afraid not. A shortcut can only be installed if its component is selected for installation. This is the default Windows Installer behavior.

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pwalters58
Posts: 8
Joined: Wed May 01, 2019 6:15 pm

Re: Cannot create desktop shortcut

Hi,
I have a project that was working fine for creating the desktop shortcut. I have com piled it multiple times, but now it refuses to make the shortcut? Why??? I did not change anything, tried recreating the shortcut, but no help.
I am also having problems with it creating files in the my documents folder. Same thing - no files. :evil:
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Cannot create desktop shortcut

Hello and welcome to our forums,

I am not so sure why this happens. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

If you cannot share with us your project file, then you can try to isolate the behavior in a buildable sample (.aip + its referenced files) which we can build and test on our side.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pwalters58
Posts: 8
Joined: Wed May 01, 2019 6:15 pm

Re: Cannot create desktop shortcut

Figured out the my documents problem, but still have no desktop or start menu shortcuts. My documents turned out to be an administrator right problem. When I am running as user, my admin name is different from my administrator name, so the files did get created, just under a different name.

For shortcut problem, I am at a dead end. My project works perfect on my home computer, so the problem is on my work machine. Have tried clearing out the registry but that did not help. About ready to try a system restore and go back about two weeks when I know it was working correctly. :evil:
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Cannot create desktop shortcut

Hello,

Indeed if your system reached a corrupted state than a proper functionality of an installation package cannot be guaranteed.

To test the functionality of your setup package, for testing purposes we always recommend to be used virtual machines with clean states so that when something goes wrong you can easily revert to a clean state of the virtual machine.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
pwalters58
Posts: 8
Joined: Wed May 01, 2019 6:15 pm

Re: Cannot create desktop shortcut

It is not acceptable that Advanced Installer can suddenly stop making the most basic part of an installation and the only solution is to wipe the drive and start over. This has been happening for years according to some of the posts in the forum. Fix it or at least warn people in your documentation about this issue. :evil:
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Cannot create desktop shortcut

Hello,

Unfortunately the only way we can further investigate and try to fix such issue is by replicating it on our side. So, if you manage to isolate and replicate the issue in a test project which you can share with us (along a small test case) this will be great.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mardalok
Posts: 2
Joined: Mon Feb 17, 2020 1:44 pm

Re: Cannot create desktop shortcut

I'm having the same issue. I have a project with shortcuts that just aren't created. The verbose log file doesn't show any obvious errors.

Code: Select all

MSI (s) (14:14) [13:40:38:711]: Doing action: CreateShortcuts
Action 13:40:38: CreateShortcuts. Creating shortcuts
Action start 13:40:38: CreateShortcuts.
CreateShortcuts: Shortcut: Creating shortcuts
MSI (s) (14:14) [13:40:38:727]: Note: 1: 2235 2:  3: DisplayResourceDLL 4: SELECT  `Shortcut`,`Name`, `FileName`, `Component`.`Directory_`, `Arguments`, `WkDir`, `Icon_`, `IconIndex`, `Hotkey`, `ShowCmd`, `Shortcut`.`Description`, `Shortcut`.`Directory_`, `Component`.`RuntimeFlags`, `Component`.`Action`, `Target`, `ComponentId`, `Feature`.`Action`, `Component`.`Installed`, `DisplayResourceDLL`, `DisplayResourceId`, `DescriptionResourceDLL`, `DescriptionResourceId` From `Shortcut`, `Feature`, `Component`, `File` WHERE `Target` = `Feature` AND `Shortcut`.`Component_` = `Component` AND `Component`.`KeyPath` = `File`.`File` AND ((`Feature`.`Action` = 1 OR `Feature`.`Action` = 2)  OR (`Feature`.`Action` = 4 AND `Feature`.`Installed` = 0) OR (`Feature`.`Action` = 3 AND (`Feature`.`Installed` = 1 OR `Feature`.`Installed` = 2 OR `Feature`.`Installed` = 4)) OR (`Feature`.`Action` = NULL AND (`Component`.`Action` = 1 OR `Component`.`Action` = 2) AND (`Feature`.`Installed` = 1 OR `Feature`.`Installed` = 2 OR `Feature`.`Installed` = 4))) 
MSI (s) (14:14) [13:40:38:727]: Note: 1: 2205 2:  3: MsiShortcutProperty 
MSI (s) (14:14) [13:40:38:727]: Note: 1: 2235 2:  3: DisplayResourceDLL 4: SELECT  `Shortcut`,`Name`, `Target`, null, `Arguments`, `WkDir`, `Icon_`, `IconIndex`, `Hotkey`, `ShowCmd`, `Shortcut`.`Description`, `Shortcut`.`Directory_`, `Component`.`RuntimeFlags`, null, null, null, null, null, `DisplayResourceDLL`, `DisplayResourceId`, `DescriptionResourceDLL`, `DescriptionResourceId` From `Shortcut`, `Component` WHERE `Shortcut`.`Component_` = `Component` AND (`Component`.`Action` = 1 OR `Component`.`Action` = 2) 
MSI (s) (14:14) [13:40:38:727]: Note: 1: 2205 2:  3: MsiShortcutProperty 
Action ended 13:40:38: CreateShortcuts. Return value 1.
I have sent you the project file and log in case you want to have a look at it since it's a really simple installer with only two files.
Maybe this orca Screenshot from the MSI can also help you:
Image
Catalin
Posts: 6597
Joined: Wed Jun 13, 2018 7:49 am

Re: Cannot create desktop shortcut

Hello and welcome to Advanced Installer forums,

First of all, thank you for the provided files.

After further investigations, I may have found out why the shortcut is not created.

Basically, your .EXE is not even copied on the machine.

"System 64" folder, where your .EXE (calc.exe) resides, resolves (at install time) to the following path:

%windir%\Windows\System32

If you travel to that directory using the file explorer and type in:

Code: Select all

calc.exe
you will notice that in that directory there already is an executable with that name (the default calculator application which comes by default with every WIndows).

With that being said, your setup tries to overwrite that (which I do not think is possible) --> your .EXE is not copied on the machine --> the shortcut is not created.

To avoid such a behavior, please rename your .EXE (e.g. calc12345.exe), rebuild your project and retest this behavior. This time, the executable should be correctly copied on the target machine and the shortcut should be created.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”