0

using inno-setup, so if there's a better way, please say so.

I've got a powershell command that will pin a dir to the quick access. something like: (new-object -com shell.application).NameSpace("D:\").Self.InvokeVerb("pintohome") or I can use a shellGuid instead of "D:\"

the actual line I'm using (in an inno function) is:

Exec('cmd.exe', '/C powershell.exe -command "(new-object -com shell.application).NameSpace(\"D:\\\").Self.InvokeVerb(\"pintohome\")"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);

However, this only adds it for the current user, and when inno is running, that's the admin user. It's for a device that runs in kiosk mode, so I need this to be effective for the 'normal' user (or for all users would be just fine).

any ideas?

I have seen and read this question, please notice this question is not about trying to install an application for somebody else, this could, presumably, be solved with a carefully crafted reg file, or other minor manipulation. This is making a change for all users, or for a group of users that affects the quick access, this has nothing to do with installing an entire application for a separate user

Keith
  • 777
  • 8
  • 27
  • Start here: [Installing application for currently logged in user from Inno Setup installer running as Administrator](https://stackoverflow.com/q/44575666/850848) – Martin Prikryl Feb 22 '19 at 08:20
  • Did you **read** my answer to the linked question? It covers even the *"change for all users"*. – Martin Prikryl Feb 28 '19 at 16:56
  • if I infer what you're suggesting, is it that I set a custom batch file (or similar) to run on first login for each user where the batch file does the quick access pinning that I want? If that's the idea you're getting at, it may be able to work. However nothing here makes my question a duplicate; perhaps an inference from your above-and-beyond answer can answer my question, but that chain of events doesn't make my question a duplicate of the other. – Keith Feb 28 '19 at 17:03
  • That's the only correct solution. -- There are other ways too (described in the middle section of my answer). – Martin Prikryl Feb 28 '19 at 17:40
  • Regarding the duplicity: What part of your question is not covered by my answer? – Martin Prikryl Feb 28 '19 at 17:40

0 Answers0