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. Web Development
  3. ASP.NET
  4. Accessing registry

Accessing registry

Scheduled Pinned Locked Moved ASP.NET
questioncsharpdatabasewindows-adminhelp
4 Posts 2 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.
  • B Offline
    B Offline
    Blue_Boy
    wrote on last edited by
    #1

    I am trying to change values of margins in Registry using C# but for path Software\\microsoft\\internet explorer\\pagesetup i got null reference, in regedit list i have path. Code which I am using is: RegistryKey pk = Registry.CurrentUser.OpenSubKey("Software\\microsoft\\internet explorer\\pagesetup", true); pk.SetValue("margin_top", "0.20000"); Is there permisions case or anything else? How can I solve it? Thanks in help to everyone.


    I Love SQL

    V 1 Reply Last reply
    0
    • B Blue_Boy

      I am trying to change values of margins in Registry using C# but for path Software\\microsoft\\internet explorer\\pagesetup i got null reference, in regedit list i have path. Code which I am using is: RegistryKey pk = Registry.CurrentUser.OpenSubKey("Software\\microsoft\\internet explorer\\pagesetup", true); pk.SetValue("margin_top", "0.20000"); Is there permisions case or anything else? How can I solve it? Thanks in help to everyone.


      I Love SQL

      V Offline
      V Offline
      Vikram
      wrote on last edited by
      #2

      I tried on admin User it worked... sending you the code.. RegistryKey r = Registry.CurrentUser; RegistryKey r1 = r.OpenSubKey("Software\\Microsoft\\Internet Explorer\\Page Setup",true); r1.SetValue("Mykey", ".Net"); r1.Close(); Vikram I Code...;)

      B 2 Replies Last reply
      0
      • V Vikram

        I tried on admin User it worked... sending you the code.. RegistryKey r = Registry.CurrentUser; RegistryKey r1 = r.OpenSubKey("Software\\Microsoft\\Internet Explorer\\Page Setup",true); r1.SetValue("Mykey", ".Net"); r1.Close(); Vikram I Code...;)

        B Offline
        B Offline
        Blue_Boy
        wrote on last edited by
        #3

        Thanks for your reply. I can figure that if user is not admin then user can not change values in registy so I'm gonna leave this option and as option I will call Print Preview with javascript. If you ever have called Print Preview with Javascritp plz share me code. Regards


        I Love SQL

        1 Reply Last reply
        0
        • V Vikram

          I tried on admin User it worked... sending you the code.. RegistryKey r = Registry.CurrentUser; RegistryKey r1 = r.OpenSubKey("Software\\Microsoft\\Internet Explorer\\Page Setup",true); r1.SetValue("Mykey", ".Net"); r1.Close(); Vikram I Code...;)

          B Offline
          B Offline
          Blue_Boy
          wrote on last edited by
          #4

          I allready found way how to open print preview using Javascript. Thanks for your time


          I Love SQL

          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