Cannot create Desktop icon: IPersistFile::Save failed; Access is denied

444 views
Skip to first unread message

Gerben Abbink

unread,
Aug 5, 2021, 9:38:38 AM8/5/21
to innosetup
I do the following to create a desktop icon:

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; MinVersion: 4,4

[Icons]
Name: "{commondesktop}\{code:GetAppNameVersion}"; Filename: "{app}\XMLBlueprint.exe"; MinVersion: 4,4; Tasks: desktopicon

Normally this works. But one customer gets an error. The log file says:

2021-08-05 06:19:41.598   -- Icon entry --
2021-08-05 06:19:41.598   Dest filename: C:\Users\Public\Desktop\XMLBlueprint 18.lnk
2021-08-05 06:19:41.598   Creating the icon.
2021-08-05 06:19:41.598   Exception message:
2021-08-05 06:19:41.598   Message box (OK):
                          IPersistFile::Save failed; code 0x80070005.
                          Access is denied.
2021-08-05 06:19:45.452   User chose OK.

Any idea how to solve this?


Jernej Simončič

unread,
Aug 5, 2021, 9:47:18 AM8/5/21
to Gerben Abbink on [innosetup]

On Thursday, August 5, 2021, 15:38:38, Gerben Abbink wrote:


Any idea how to solve this?

What's your PrivilegesRequired setting?

 

-- 
< Jernej Simončič ><><><><>< https://eternallybored.org/ >


Never offend people with style when you can offend them with substance.
       -- Samuels Postulate

Gerben Abbink

unread,
Aug 5, 2021, 10:26:25 AM8/5/21
to inno...@googlegroups.com
PrivilegesRequired=Lowest


--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/1505548630.20210805154715%40eternallybored.org.

Jernej Simončič

unread,
Aug 5, 2021, 11:40:39 AM8/5/21
to Gerben Abbink on [innosetup]

On Thursday, August 5, 2021, 16:26:11, Gerben Abbink wrote:


PrivilegesRequired=Lowest

In that case you can't use any of the {common*} constants, as those directories are only writable when elevated.

 

-- 
< Jernej Simončič ><><><><>< https://eternallybored.org/ >


Anything hit with a big enough hammer will fall apart.
       -- Jake's Law

Gerben Abbink

unread,
Aug 5, 2021, 2:57:18 PM8/5/21
to inno...@googlegroups.com
What should i use instead of {commondesktop} to create a desktop shortcut?

--
You received this message because you are subscribed to a topic in the Google Groups "innosetup" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/innosetup/qo5OGCl2Fvg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/1787294154.20210805174036%40eternallybored.org.

Jernej Simončič

unread,
Aug 5, 2021, 4:27:45 PM8/5/21
to Gerben Abbink on [innosetup]

On Thursday, August 5, 2021, 20:57:05, Gerben Abbink wrote:


What should i use instead of {commondesktop} to create a desktop shortcut?

{userdesktop}

 

-- 
< Jernej Simončič ><><><><>< https://eternallybored.org/ >


Use it.
       -- Howard's First Law of Theater

Gerben Abbink

unread,
Aug 6, 2021, 8:25:10 AM8/6/21
to inno...@googlegroups.com
Thank you.

--
You received this message because you are subscribed to the Google Groups "innosetup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to innosetup+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/innosetup/131659149.20210805222741%40eternallybored.org.
Reply all
Reply to author
Forward
0 new messages