Shoutbox

Force UAC - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Force UAC (/showthread.php?tid=88474)

Force UAC by djdannyp on 01-15-2009 at 07:43 PM

And for the hat-trick.....

I'm modifying a C# program which needs UAC on vista (as it needs registry access) and i'm having problems.

When it initially launches it launches from a C++ program which is set to ask for UAC, so it automatically runs as elevated.....however after a computer re-start (which is often required) the C# program automatically re-launches at the point where it left off......but it doesn't give the UAC prompt and so it can't access the registry and throws up errors.

I don't have access to it now, but my work-around was to right click on the second program and click the "run as administrator" box, so that it always forces the UAC prompt when it loads.......however i'm sure there must be an easier way

I'm using Visual Studio 2008.....is there some way to compile a program such that it will require UAC?  Like a setting or something?  Or is my best bet to go for what I was thinking?

Thanks in advance :)


RE: Force UAC by Mike on 01-15-2009 at 08:44 PM

Right click the executable -> Properties -> Compatibility -> Run as Administrator :)


RE: RE: Force UAC by Vilkku on 01-15-2009 at 09:05 PM

quote:
Originally posted by Mike
Right click the executable -> Properties -> Compatibility -> Run as Administrator :)
Did you read his post?
quote:
Originally posted by djdannyp
I don't have access to it now, but my work-around was to right click on the second program and click the "run as administrator" box, so that it always forces the UAC prompt when it loads.......however i'm sure there must be an easier way

RE: Force UAC by Mike on 01-15-2009 at 09:14 PM

quote:
Originally posted by Vilkku
Did you read his post?
It sounds like he's using the right click context menu to do it every time.
If he ticks that box it will ask him every time he launches the executable if we wants to elevate the program (which looks like it is what he wants, unless I misunderstood what he wants :P)
RE: Force UAC by prashker on 01-15-2009 at 09:17 PM

http://www.professionalvisualstudio.com/blog/2007...-for-uac-on-vista/ < looks helpful

http://blogs.msdn.com/knom/archive/2007/06/12/uac...l-studio-2008.aspx < msdn


RE: Force UAC by vaccination on 01-15-2009 at 09:17 PM

http://www.professionalvisualstudio.com/blog/2007...-for-uac-on-vista/

http://www.google.co.uk/search?hl=en&q=UAC+settin...oogle+Search&meta=

EDIT: fuck you sam :<


RE: Force UAC by djdannyp on 01-16-2009 at 08:55 AM

Hmm, my Visual Studio 2008 looks different to that......maybe cos that's a VB project and mine is C#?

Oh well, either way I've got an app.manifest now and it brings up the UAC prompt when running the program

Woo :D