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. C#
  4. Registry

Registry

Scheduled Pinned Locked Moved C#
windows-adminquestion
6 Posts 3 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.
  • D Offline
    D Offline
    damianrda
    wrote on last edited by
    #1

    im trying to write to hklm so i can set my app to start up with windows, however, vista refuses access to hklm, any way to elevate the program access rights?

    S E 2 Replies Last reply
    0
    • D damianrda

      im trying to write to hklm so i can set my app to start up with windows, however, vista refuses access to hklm, any way to elevate the program access rights?

      S Offline
      S Offline
      Simon P Stevens
      wrote on last edited by
      #2

      You need to include a manifest in your app to tell vista that it requires elevation. Alternatively, there are API methods you can call to only elevate briefly while you perform the action. You should still include a manifest though, because it's in the manifest you tell vista your app is aware of UAC and how vista should behave.

      Simon

      1 Reply Last reply
      0
      • D damianrda

        im trying to write to hklm so i can set my app to start up with windows, however, vista refuses access to hklm, any way to elevate the program access rights?

        E Offline
        E Offline
        enginco
        wrote on last edited by
        #3

        if you want to run a program with admin rights after login you can make a scheduled task.‌ I did it for remove c$ and admin$.

        S 1 Reply Last reply
        0
        • E enginco

          if you want to run a program with admin rights after login you can make a scheduled task.‌ I did it for remove c$ and admin$.

          S Offline
          S Offline
          Simon P Stevens
          wrote on last edited by
          #4

          You can disable the administrative shares properly if you want. http://en.wikipedia.org/wiki/Administrative_share#How_to_disable[^] It's not really necessary though. They are only accessibly locally on the domain and you have to have local admin access on the PC to view them. If someone has local admin access, they could just log in and create any shares they wanted anyway. It isn't a security hole to all your files. We use them quite a bit, it's handy to get to log files and stuff without having to go to the PC, or remote in, or create a proper share.

          Simon

          E 1 Reply Last reply
          0
          • S Simon P Stevens

            You can disable the administrative shares properly if you want. http://en.wikipedia.org/wiki/Administrative_share#How_to_disable[^] It's not really necessary though. They are only accessibly locally on the domain and you have to have local admin access on the PC to view them. If someone has local admin access, they could just log in and create any shares they wanted anyway. It isn't a security hole to all your files. We use them quite a bit, it's handy to get to log files and stuff without having to go to the PC, or remote in, or create a proper share.

            Simon

            E Offline
            E Offline
            enginco
            wrote on last edited by
            #5

            good article thanks, but there is no in VISTA Hive: HKEY_LOCAL_MACHINE Key: SYSTEM\CurrentControlSet\Services\LanManServer\Parameters Name: AutoShareWks where is AutoShareWks?

            modified on Friday, July 18, 2008 8:49 AM

            S 1 Reply Last reply
            0
            • E enginco

              good article thanks, but there is no in VISTA Hive: HKEY_LOCAL_MACHINE Key: SYSTEM\CurrentControlSet\Services\LanManServer\Parameters Name: AutoShareWks where is AutoShareWks?

              modified on Friday, July 18, 2008 8:49 AM

              S Offline
              S Offline
              Simon P Stevens
              wrote on last edited by
              #6

              You have to create it. (it's a DWORD type key)

              Simon

              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