Old 2nd February 2008, 08:56   #1
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Control Panel uninstall wont CallAs Guest user

This problem is Windows Vista-related. I have an application that writes to its own directory (usually in Program Files\whatever), so the written file ends up in VirtualStore. I cannot change this behaviour, as the application is not mine.

When uninstalling this app in Windows Vista through Control Panel / Programs and Features, I am unable to get CallFunctionAsUser to reach the guest user. Instead, the function is called as the (admin-)user that the uninstaller was elevated to.

I have attached an example script. The installer manually creates a file in the Guest User's VirtualStore, and the uninstaller tries to delete it.
1) I login as guest user and run install.
2) It asks for an Admin login, so I log in as my standard account, "Maarten".
3) Installation completes successfully.
4) I go to Control Panel / Programs and Features, and start uninstall.
5) It asks for an Admin login, so I log in as my standard account, "Maarten".
6) The output of the MessageBox call is: C:\Users\Maarten\AppData\Local\VirtualStore\Program Files\UAC Test\test.dat

In other words, un.UserFunction was called as Maarten, not as Guest User. However, if I start the uninstaller manually through Explorer, the function DOES get called as Guest User.
My question is now, is this a bug in the UAC plugin, a 'feature' in Windows, or am I doing something wrong?

Thanks in advance for any help.
Attached Files
File Type: nsi example1.nsi (1.4 KB, 253 views)
MSG is offline   Reply With Quote
Old 2nd February 2008, 19:25   #2
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
http://forums.winamp.com/showthread....06#post2240806

So, the UAC plugin is not the real solution here, if you are admin, you can enumerate all the users anyway, so use http://nsis.sourceforge.net/EnumUsersReg , figure out the path to the virtual store and delete your folder

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
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