Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Sometimes, I am forced to use the GUI in front of a logged in user and remove trashy software. They are not registered with Windows Installer, and I rather use the GUI in a time crunch instead of picking apart registry keys that get me so-so results. Sometimes, I need to delete a few programs in a row. So, I open an elevated command prompt in Windows Vista or Windows 7. I then try the following.

rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl

or

control.exe /name Microsoft.ProgramsAndFeatures

Either way, much to the chagrin of my XP ways, I must given admin credentials to elevate for every piece of software I must install. This is hugely annoying, so is there any clever way where I still can see the GUI? (I know, I know, I hate it a lot more than you, but I ask anyway).

UPDATE: Also forgot you used to be able to call things directly through shell extensions CLSIDS (from the registry key HKLM\Software\Microsoft\Classes\CLSID) in XP. For example, this is how you got ncpa.cpl because the proposed entry point into shell32.dll I use above does not work for certain aggregrated control panel applets, like the aforementioned in particular.

runas /user:Administrator /noprofile "explorer /n,::{7007ACC3-3202-11D1-AAD2-00805FC1270E}"

I am too lazy to copy and paste, but I tried the equivalent for appwiz.cpl and/or Programs and Features in the registry, and it silently dies. Anyone have a clues? Also, I am running on Windows 7 Enterprise x64. Does this change things? In my experience, no, but I could not be sure.

share|improve this question
    
Is there any reason the runas command won't work? –  Iszi Feb 24 '11 at 18:44
    
@Iszi, did you read? Haha. I am blunt because runas or elevation gets you the same first step, which is running as a separate account. For some reason, this works in XP and errors out in Vista/7 if I try the former rundll32 command. Nonetheless, I get the GUI to popup in Vista/7 through the elevated command prompt (or opening an elevated command prompt with runas), but I still need to re-authenticate every install. –  ajstein Feb 24 '11 at 18:55
    
@alharaka - Sorry, I must have had a mental lapse there. It is kind of odd that the system is doing that if the applet is indeed running with elevated privileges. It should just be prompting you with the usual UAC yes/no confirmation as far as I know. On a separate note, why are you using such long commands to get to the Add/Remove Programs or Programs And Features dialogues? You should be able to just get there by running appwiz.cpl from the prompt, and that should work regardless of OS version. –  Iszi Feb 24 '11 at 19:04
    
@Iszi The point is that if I do what you suggest, I need to enter admin credentials ten times in a row to uninstall programs. Sometimes, I can just log into the console session and be done without. Other times, the user has a lot of work open and logging them off makes them whine. This gives me the best of both worlds. –  ajstein Feb 24 '11 at 19:10
    
@alharaka - Could you meet me in chat? chat.stackexchange.com/rooms/310/… –  Iszi Feb 24 '11 at 19:39
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.