Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. How to create file in system folder when UAC feature is enable in Vista?

How to create file in system folder when UAC feature is enable in Vista?

Scheduled Pinned Locked Moved Windows API
helpc++jsontutorialquestion
19 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A ashipandey

    Please don't give irritating answers.My application will use registry and windows system folder to store sensitive security information. Since windows introduing one great feature,we can not redesign entire application. Its very funny to think. My application is based on unmanaged Win32/C++ platform. For managed applications there is some workaround using manifest. Is there any workaround for problems like my applications? Please anyone, share your experience who faces the similar problem.

    D Offline
    D Offline
    Dan Neely
    wrote on last edited by
    #10

    People with YOUR attitude are the reason WHY MS was forced to implement the UAC sledgehammer. They've been writing best practice guides and logo certification requirements trying to persuade developers to write applications that will run as normal users since at least the win2k era. After so long though, it becomes clear that asking nicely just isn't going to work and out comes the warclub. ***SPLAT***

    -- If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.

    V 1 Reply Last reply
    0
    • A ashipandey

      Please don't give irritating answers.My application will use registry and windows system folder to store sensitive security information. Since windows introduing one great feature,we can not redesign entire application. Its very funny to think. My application is based on unmanaged Win32/C++ platform. For managed applications there is some workaround using manifest. Is there any workaround for problems like my applications? Please anyone, share your experience who faces the similar problem.

      J Offline
      J Offline
      Jonathan Darka
      wrote on last edited by
      #11

      I'll answer your question. You 'really' should move the location of the file, but to get around it you can use a manifest file to elevate your app and then it should work. regards,


      Jonathan Wilkes Darka[Xanya.net]

      A 1 Reply Last reply
      0
      • J Jonathan Darka

        I'll answer your question. You 'really' should move the location of the file, but to get around it you can use a manifest file to elevate your app and then it should work. regards,


        Jonathan Wilkes Darka[Xanya.net]

        A Offline
        A Offline
        ashipandey
        wrote on last edited by
        #12

        Thankx for the answer. I tried using manifest file to elevate my application but unable to fix it. My application uses unmanaged C++ and visual studio 2003 as tool.Is manifest file applicable for unmanaged C++ application? Here is the manifest code.

        J 1 Reply Last reply
        0
        • A ashipandey

          Thankx for the answer. I tried using manifest file to elevate my application but unable to fix it. My application uses unmanaged C++ and visual studio 2003 as tool.Is manifest file applicable for unmanaged C++ application? Here is the manifest code.

          J Offline
          J Offline
          Jonathan Darka
          wrote on last edited by
          #13

          Unfortunately I cannot see much of your manifest file, problems with < > and HTML I suspect :-) Here is mine;

          <?xml version="1.0" encoding="utf-8" standalone="yes"?>
          <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
          <assemblyIdentity version="1.0.0.0"
          processorArchitecture="X86"
          name="MyExe.exe"
          type="win32"/>
          <description>MyExe Description</description>

          <!-- Identify the application security requirements. -->
          <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
          <security>
          <requestedPrivileges>
          <requestedExecutionLevel
          level="requireAdministrator"
          uiAccess="false"/>
          </requestedPrivileges>
          </security>
          </trustInfo>
          </assembly>

          regards,


          Jonathan Wilkes Darka[Xanya.net]

          A 1 Reply Last reply
          0
          • J Jonathan Darka

            Unfortunately I cannot see much of your manifest file, problems with < > and HTML I suspect :-) Here is mine;

            <?xml version="1.0" encoding="utf-8" standalone="yes"?>
            <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
            <assemblyIdentity version="1.0.0.0"
            processorArchitecture="X86"
            name="MyExe.exe"
            type="win32"/>
            <description>MyExe Description</description>

            <!-- Identify the application security requirements. -->
            <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
            <security>
            <requestedPrivileges>
            <requestedExecutionLevel
            level="requireAdministrator"
            uiAccess="false"/>
            </requestedPrivileges>
            </security>
            </trustInfo>
            </assembly>

            regards,


            Jonathan Wilkes Darka[Xanya.net]

            A Offline
            A Offline
            ashipandey
            wrote on last edited by
            #14

            Thankx Jonathan.It works fine. Currently i have to put the "myexe.exe.manifest" file along with my application exe.Is it possible to embedd into the resource file?

            J 1 Reply Last reply
            0
            • D Dan Neely

              People with YOUR attitude are the reason WHY MS was forced to implement the UAC sledgehammer. They've been writing best practice guides and logo certification requirements trying to persuade developers to write applications that will run as normal users since at least the win2k era. After so long though, it becomes clear that asking nicely just isn't going to work and out comes the warclub. ***SPLAT***

              -- If you view money as inherently evil, I view it as my duty to assist in making you more virtuous.

              V Offline
              V Offline
              Vasudevan Deepak Kumar
              wrote on last edited by
              #15

              dan neely wrote:

              People with YOUR attitude are the reason WHY MS was forced to implement the UAC sledgehammer.

              When you say politely people don't listen. Unless M$ brandished out a whip called UAC, they could not come to terms. Now they are thinking of unlearning their bad habits and laziness (inertia). :mad:

              Vasudevan Deepak Kumar Personal Homepage Tech Gossips

              1 Reply Last reply
              0
              • A ashipandey

                Thankx Jonathan.It works fine. Currently i have to put the "myexe.exe.manifest" file along with my application exe.Is it possible to embedd into the resource file?

                J Offline
                J Offline
                Jonathan Darka
                wrote on last edited by
                #16

                Glad to help, if you want to embed the manifest in your application then open your resource file e.g. myapp.rc in a text editor and add the following: For an executable

                /////////////////////////////////////////////////////////////////////////////
                //
                // RT_MANIFEST
                //
                1 RT_MANIFEST "MyApp.exe.manifest"

                and for a DLL or control panel applet

                /////////////////////////////////////////////////////////////////////////////
                //
                // RT_MANIFEST
                //

                2 RT_MANIFEST "MyApp.dll.manifest"

                regards,


                Jonathan Wilkes Darka[Xanya.net]

                A 2 Replies Last reply
                0
                • J Jonathan Darka

                  Glad to help, if you want to embed the manifest in your application then open your resource file e.g. myapp.rc in a text editor and add the following: For an executable

                  /////////////////////////////////////////////////////////////////////////////
                  //
                  // RT_MANIFEST
                  //
                  1 RT_MANIFEST "MyApp.exe.manifest"

                  and for a DLL or control panel applet

                  /////////////////////////////////////////////////////////////////////////////
                  //
                  // RT_MANIFEST
                  //

                  2 RT_MANIFEST "MyApp.dll.manifest"

                  regards,


                  Jonathan Wilkes Darka[Xanya.net]

                  A Offline
                  A Offline
                  ashipandey
                  wrote on last edited by
                  #17

                  Thanks Jonathan for your kind help. Thanks alot.

                  1 Reply Last reply
                  0
                  • J Jonathan Darka

                    Glad to help, if you want to embed the manifest in your application then open your resource file e.g. myapp.rc in a text editor and add the following: For an executable

                    /////////////////////////////////////////////////////////////////////////////
                    //
                    // RT_MANIFEST
                    //
                    1 RT_MANIFEST "MyApp.exe.manifest"

                    and for a DLL or control panel applet

                    /////////////////////////////////////////////////////////////////////////////
                    //
                    // RT_MANIFEST
                    //

                    2 RT_MANIFEST "MyApp.dll.manifest"

                    regards,


                    Jonathan Wilkes Darka[Xanya.net]

                    A Offline
                    A Offline
                    ashipandey
                    wrote on last edited by
                    #18

                    Hi Jonathan, For my appl executable i have inclued the above line (RT_MANIFEST into the myexe.rc)and it worked for the console based application.But for the GUI app. it is not working.Do i need to edit into the manifest file or need to create separate manifest(MyApp.dll.manifest) file for it.

                    J 1 Reply Last reply
                    0
                    • A ashipandey

                      Hi Jonathan, For my appl executable i have inclued the above line (RT_MANIFEST into the myexe.rc)and it worked for the console based application.But for the GUI app. it is not working.Do i need to edit into the manifest file or need to create separate manifest(MyApp.dll.manifest) file for it.

                      J Offline
                      J Offline
                      Jonathan Darka
                      wrote on last edited by
                      #19

                      Each exe and dll should have their own manifest, you should not need to modify the manifest (except maybe the description). Just embed it into both apps, if both are executables then use the first example I gave, else if they are DLL's then use the second. It should work fine for the GUI app too, in Vista when the executable is recognised as having a manifest file (by explorer for example) then the elevated shield icon will be overlayed on your aplications icon. If your apps icon does not have an overlay of the shield then Vista does not recognise the manifest, you may need to clear the explorer icon cache before it sees it. To do this kill (using task manager) ALL instances of explorer.exe, then start a new instance. regards,


                      Jonathan Wilkes Darka[Xanya.net]

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups