Archive: Control Panel uninstall wont CallAs Guest user


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.


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