|
-
January 18th, 2011, 01:58 AM
#1
UAC My first days with C#
I am learning C#, my application needs to run on Vista and 7, but UAC turned on always reports error of access violation. I tried Right-Click-To-Run-As-Admin but it didn't help. How can I run the application without turning it off ?
Thank you.
-
January 18th, 2011, 02:57 AM
#2
Re: UAC My first days with C#
You need a manifest file. When you run your application, the UAC dialog will pop up to ask permision for you application.
Just google for 'C# manifest' and I'm sure you'll find something usefull.
-
January 18th, 2011, 03:01 AM
#3
Re: UAC My first days with C#
Like Danny said, a manifest file is the way to go if you *absolutely* need to run as an admin. However, you should ask yourself if you actually need this in the first place. You very may well need admin privileges, but if you post the problem at hand we may be able to help you find a way around it.
-
January 19th, 2011, 03:12 PM
#4
Re: UAC My first days with C#
Thank you,
I only copy and paste a code snip on the net into my Console to loop through my Cdrive's directories to display all files, but I am reported as unable to access some folder without an admin priviledge. I right click my application.exe but the problem remains at a different location. I wonder how different it becomes to use a manifest to run as an admin and to choose Run as Admin by rightclick of my mouse ?
If a manifest works best always through Vista and 7's security, then I guess MFC's life is going to end very soon , am I correct ? Or is it that people might have 'immigrated' into C# long before I think so ?
-
January 19th, 2011, 03:57 PM
#5
Re: UAC My first days with C#
Why do you think that an MFC application would be unable to request administrative privileges?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|