View Single Post
Old 30th November 2010, 08:40   #19
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by hobbes487 View Post
Adding the run as administrator on a shortcut works great. Is it possible to add that property to the actual exe? I have an application that runs automatically when a file with a special extension is opened and I need it to run as admin.
Normally I'd say 'add a manifest', but I have no idea if that works for file associations. I think you can put "runas.exe /user:Administrator yourexe.exe %1" (or something similar) as the opening application, and it will throw a window asking for the admin password. But it's probably much better to make your exe take care of this problem itself: make it so it launches another instance of itself as admin, if it's being run as user.
MSG is offline   Reply With Quote