Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread Display Modes
Old 27th February 2007, 00:53   #1
Junior Member
Join Date: Feb 2007
Posts: 1
Vista - Cannot copy files to non-admin user's Desktop/Pictures

Hello all,

My installer copies some files to the "$DESKTOP" and "$PICTURES" folder of the current user. I have tested it with Window XP and it works fine for admin and non-admin users. However, it does not work correctly with Vista. No matter which user I am logged in as, the files are always copied into the administrator's folders as opposed to the current user's folders.

I have tried running the "UserInfo.exe" example (that comes with the NSIS installation) as a non-admin user and noticed that UserInfo::GetName and UserInfo::GetAccountType always return the information of the Administrator user whose password was used to authorized the installation. Is this an OS bug? Can I do something to fix this?

I am using the "RequestExecutionLevel admin" command to avoid getting the warning message after the vista installation. Also, I have tried using the "SetShellVarContext current" command just before calling "$PICTURES" but it didnt work as expected.

Any help will be appreciated.
marucosuz is offline   Reply With Quote
Old 27th February 2007, 06:07   #2
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Vista not only elevates installer's process rights (UAC), but makes it running from administrator. This way installer forgets about logged user and executes installer as it was started by admin. Thread with the same problem http://forums.winamp.com/showthread....hreadid=265780
May be Vista SDK can help with process token tricks (new NSIS plug-in required), but SDK "Download Size: 1 KB - 1185.7 MB*" :-( http://www.microsoft.com/downloads/d...displaylang=en
Takhir is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump