locked
Problem of running program through UAC (Own made program) How to write the code to pass through it? RRS feed

  • Question

  •  

    I have implemented program which need to create the folder when first run the program but it cannot create folder because it said "access denied".

     

    So I turn off UAC and run the program now my program is working ok. So I think I need to implement some more code to make my program has a permission on UAC to create the folder.

     

    Can any one give me an idea about this because I don't know what should I search for in google. I am using c# for my program so please advise me.

     

    Best Regards,

     

    Thursday, June 12, 2008 4:25 PM

All replies

  • 'first run' initialization should be limited to per-user changes, generally speaking.

    Thursday, June 12, 2008 8:57 PM
  • Hi teletoppy:

    Check out my guide to UAC: UAC: All Information Developers need about the User Account Control (UAC).

    Also, you must execute your application in elevation mode. You can do this by modifing the app.manifest, like this:

    Normal: 
        <requestedExecutionLevel level="asInvoker" uiAccess="false" />

    Modified, to execute in elevation mode (first execution): 
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

    Information:
    The app.maniest has three levels.

    asInvoker: This level is the Standard token user level (A none-admin user).

    requireAdministrator: This is the administrator user level.

    highestAvailable: This is the level that allows you to execute a program with the highest available user
    (A user that has full permission/access to everything).


    I hope this information was helpful...

    Coder24.com
    • Proposed as answer by Fisnik Hasani Saturday, October 10, 2009 8:04 AM
    Sunday, October 4, 2009 3:52 PM
  • Hello teletoppy:

    Is this issue solved? How is the situation on your side?
    Please provide some information, thanks!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Friday, October 9, 2009 7:36 PM
  • Hello teletoppy:

    Is this issue solved? How is the situation on your side?
    Please provide some information, thanks!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Friday, October 23, 2009 8:08 PM
  • Hi again:

    How is the situation on your side?
    Is this thread solved or NOT?

    Please tell me!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Friday, November 13, 2009 7:42 PM
  • Hi again:

    How is the situation on your side?
    Is this thread solved?

    Please tell me!

    Have a nice day...

    Best regards,
    Fisnik
    Coder24.com
    Sunday, December 27, 2009 10:20 AM
  • Hi again:

    Is this thread solved or NOT?
    Please tell me!

    Have a nice day...

    Best regards,
    Fisnik

    Coder24.com
    Saturday, January 2, 2010 2:30 PM