0
votes

I'm creating an installer with NSIS.

It does exactly 2 things. Creates a shortcut to an executable, and puts a dll in the system32 directory.

I have to request admin elevation to achieve the copy into system32 for the dll's

However when its running with admin rights the mapped drive disappears and becomes a UNC path. I want to keep it the mapped drive path though. Some internet research shows that when elevated to admin UNC paths replace mapping which are user specific.

How can I achieve both in the same install?

1

1 Answers

0
votes

Mapped drives are per logon-session (token) and UAC uses a split-token model when elevating so there are no ways around this. See this blog post for more details.

You could elevate cmd.exe and map the drive again before running setup...