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. The Lounge
  3. Why windows 7 is rubbish

Why windows 7 is rubbish

Scheduled Pinned Locked Moved The Lounge
csharpc++comwindows-admintools
27 Posts 10 Posters 4 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.
  • C Christian Graus

    If an msi can do that, without having to right click and run as admin, then that seems counter intuitive to me, given that my app can't. If there's a way I can test for every possible Windows 7 configuration to make sure my users can use the msi, then I'll probably do it, but it worries me, because it's all obviously flaky to start with.

    Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

    H Offline
    H Offline
    Hans Dietrich
    wrote on last edited by
    #10

    Christian Graus wrote:

    but it worries me, because it's all obviously flaky to start with

    I understand your concern, but in this particular case I think it works well. This technique is what stopped the rioting of the UAC wars. :)

    Best wishes, Hans


    [Hans Dietrich Software]

    C 1 Reply Last reply
    0
    • C Christian Graus

      Apparently, the person reading the registry key I need to write, has found that his code works in Weven ( he's in C++ ) and it just writes to CurrentUser instead of LocalMachine. In C#, the code crashes if I try to write to LocalMachine, unless the user right clicks and runs as admin. Not much good for an auto run installer app, or even just a general user app. So, now my app will need to be registered by every user who uses it, or we need to change the registration mechanism.

      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

      N Offline
      N Offline
      NormDroid
      wrote on last edited by
      #11

      :sigh: Time to use Unix or Apple and let let me tell you, you'll be begging to come back. In windows YOU CAN NOT write to local machine unless you are Admin, this is by design and a security feature to stop malicous code.

      Software Kinetics - The home of good software

      1 Reply Last reply
      0
      • C Christian Graus

        That's a good question, I guess I should look at my installer package to see if it supports that. Is such a setting permanent, because in my case, someone could install, and run the registration app later. My big fear would be that trying to do this, might cause the installer to just not run at all.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        N Offline
        N Offline
        NormDroid
        wrote on last edited by
        #12

        You'd still have to run 'As Administrator' when launching the install program.

        Software Kinetics - The home of good software

        C 1 Reply Last reply
        0
        • C Christian Graus

          Apparently, the person reading the registry key I need to write, has found that his code works in Weven ( he's in C++ ) and it just writes to CurrentUser instead of LocalMachine. In C#, the code crashes if I try to write to LocalMachine, unless the user right clicks and runs as admin. Not much good for an auto run installer app, or even just a general user app. So, now my app will need to be registered by every user who uses it, or we need to change the registration mechanism.

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #13

          Wouldn't you have the same issue logged in as a limited XP user? I'm pretty sure you can't write to HKLM in that case either.

          Blogging about Qt Creator

          C 1 Reply Last reply
          0
          • N NormDroid

            You'd still have to run 'As Administrator' when launching the install program.

            Software Kinetics - The home of good software

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #14

            Then it's useless. I tried creating a manifest that runs as admin and it did not help.

            Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

            A 1 Reply Last reply
            0
            • L Lost User

              Wouldn't you have the same issue logged in as a limited XP user? I'm pretty sure you can't write to HKLM in that case either.

              Blogging about Qt Creator

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #15

              Well, I guess it's possible, although not common, for an XP machine to be locked down so that software needs to be installed again for each user.

              Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

              H L 2 Replies Last reply
              0
              • H Hans Dietrich

                Christian Graus wrote:

                but it worries me, because it's all obviously flaky to start with

                I understand your concern, but in this particular case I think it works well. This technique is what stopped the rioting of the UAC wars. :)

                Best wishes, Hans


                [Hans Dietrich Software]

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #16

                No, it does not work. The msi ran fine, but I still can't write to that key.

                Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                1 Reply Last reply
                0
                • C Christian Graus

                  Well, I guess it's possible, although not common, for an XP machine to be locked down so that software needs to be installed again for each user.

                  Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                  H Offline
                  H Offline
                  Hans Dietrich
                  wrote on last edited by
                  #17

                  Wow. It looks like you have a uni-follower.

                  Best wishes, Hans


                  [Hans Dietrich Software]

                  1 Reply Last reply
                  0
                  • C Christian Graus

                    Apparently, the person reading the registry key I need to write, has found that his code works in Weven ( he's in C++ ) and it just writes to CurrentUser instead of LocalMachine. In C#, the code crashes if I try to write to LocalMachine, unless the user right clicks and runs as admin. Not much good for an auto run installer app, or even just a general user app. So, now my app will need to be registered by every user who uses it, or we need to change the registration mechanism.

                    Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                    P Offline
                    P Offline
                    PIEBALDconsult
                    wrote on last edited by
                    #18

                    The registry is evil, don't use it.

                    1 Reply Last reply
                    0
                    • C Christian Graus

                      Well, I guess it's possible, although not common, for an XP machine to be locked down so that software needs to be installed again for each user.

                      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #19

                      We see limited-user XP setups all the time, especially with larger customers who have thousands of desktops (I work in the automotive industry so I'm talking about companies like Mercedes-Benz, BMW, etc.) I don't use the registry any more tbh - I've gone back to using INI files! Much less hassle and easier to support because they can be sent via email and edited by hand without danger of breaking something else.

                      Blogging about Qt Creator

                      M C 2 Replies Last reply
                      0
                      • C Christian Graus

                        Apparently, the person reading the registry key I need to write, has found that his code works in Weven ( he's in C++ ) and it just writes to CurrentUser instead of LocalMachine. In C#, the code crashes if I try to write to LocalMachine, unless the user right clicks and runs as admin. Not much good for an auto run installer app, or even just a general user app. So, now my app will need to be registered by every user who uses it, or we need to change the registration mechanism.

                        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                        A Offline
                        A Offline
                        Anna Jayne Metcalfe
                        wrote on last edited by
                        #20

                        That's not new at all; in fact writing to HKLM from a user app has been deprecated behaviour since at least Windows 2000 (along with writing to Program Files etc.). It's just that it wasn't enforced until 2006 when Vista arrived (the redirect to HKCU is for backward compatibility for badly behaved apps). I'm a bit surprised you're only discovering this now, to be honest.

                        Anna :rose: Tech Blog | Visual Lint "Why would anyone prefer to wield a weapon that takes both hands at once, when they could use a lighter (and obviously superior) weapon that allows you to wield multiple ones at a time, and thus supports multi-paradigm carnage?"

                        C 1 Reply Last reply
                        0
                        • L Lost User

                          We see limited-user XP setups all the time, especially with larger customers who have thousands of desktops (I work in the automotive industry so I'm talking about companies like Mercedes-Benz, BMW, etc.) I don't use the registry any more tbh - I've gone back to using INI files! Much less hassle and easier to support because they can be sent via email and edited by hand without danger of breaking something else.

                          Blogging about Qt Creator

                          M Offline
                          M Offline
                          Mycroft Holmes
                          wrote on last edited by
                          #21

                          Rob Caldecott wrote:

                          I've gone back to using INI files!

                          Whats old is new again - isn't a config file just an ini file on xml! I don't understand anyone using the registry these days, me thinks CG is going to have to change his rego regime.

                          Never underestimate the power of human stupidity RAH

                          1 Reply Last reply
                          0
                          • L Lost User

                            We see limited-user XP setups all the time, especially with larger customers who have thousands of desktops (I work in the automotive industry so I'm talking about companies like Mercedes-Benz, BMW, etc.) I don't use the registry any more tbh - I've gone back to using INI files! Much less hassle and easier to support because they can be sent via email and edited by hand without danger of breaking something else.

                            Blogging about Qt Creator

                            C Offline
                            C Offline
                            Christian Graus
                            wrote on last edited by
                            #22

                            Yeah, I know. I do the same, but in this case, I am doing what I was told to pass info from my program to theirs. I've suggested we revert to using an ini file.

                            Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                            1 Reply Last reply
                            0
                            • C Christian Graus

                              Then it's useless. I tried creating a manifest that runs as admin and it did not help.

                              Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                              A Offline
                              A Offline
                              Anna Jayne Metcalfe
                              wrote on last edited by
                              #23

                              The manifest should work; we've used this technique ourself. Alternatively, if the installer has "setup" in the name the system will assume it's an installer and automatically elevate it (for backward compatibility with installers without manifests).

                              Anna :rose: Tech Blog | Visual Lint "Why would anyone prefer to wield a weapon that takes both hands at once, when they could use a lighter (and obviously superior) weapon that allows you to wield multiple ones at a time, and thus supports multi-paradigm carnage?"

                              1 Reply Last reply
                              0
                              • A Anna Jayne Metcalfe

                                That's not new at all; in fact writing to HKLM from a user app has been deprecated behaviour since at least Windows 2000 (along with writing to Program Files etc.). It's just that it wasn't enforced until 2006 when Vista arrived (the redirect to HKCU is for backward compatibility for badly behaved apps). I'm a bit surprised you're only discovering this now, to be honest.

                                Anna :rose: Tech Blog | Visual Lint "Why would anyone prefer to wield a weapon that takes both hands at once, when they could use a lighter (and obviously superior) weapon that allows you to wield multiple ones at a time, and thus supports multi-paradigm carnage?"

                                C Offline
                                C Offline
                                Christian Graus
                                wrote on last edited by
                                #24

                                Anna-Jayne Metcalfe wrote:

                                I'm a bit surprised you're only discovering this now, to be honest.

                                *grin* I've known for a long time that the registry is not the recommended way to do things, this is the first time I've touched it in ages ( I had to look up the code for accessing the registry in .NET ). In that sense, I'm not surprised there are issues, it's just frustrating, I mean, again, what's HKLM for, if not to store something machine wide ?

                                Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                                H A 2 Replies Last reply
                                0
                                • C Christian Graus

                                  Anna-Jayne Metcalfe wrote:

                                  I'm a bit surprised you're only discovering this now, to be honest.

                                  *grin* I've known for a long time that the registry is not the recommended way to do things, this is the first time I've touched it in ages ( I had to look up the code for accessing the registry in .NET ). In that sense, I'm not surprised there are issues, it's just frustrating, I mean, again, what's HKLM for, if not to store something machine wide ?

                                  Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                                  H Offline
                                  H Offline
                                  Hans Dietrich
                                  wrote on last edited by
                                  #25

                                  Christian Graus wrote:

                                  I mean, again, what's HKLM for

                                  It's to tempt you, like the tree in the Garden of Eden.

                                  Best wishes, Hans


                                  [Hans Dietrich Software]

                                  1 Reply Last reply
                                  0
                                  • C Christian Graus

                                    Apparently, the person reading the registry key I need to write, has found that his code works in Weven ( he's in C++ ) and it just writes to CurrentUser instead of LocalMachine. In C#, the code crashes if I try to write to LocalMachine, unless the user right clicks and runs as admin. Not much good for an auto run installer app, or even just a general user app. So, now my app will need to be registered by every user who uses it, or we need to change the registration mechanism.

                                    Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                                    L Offline
                                    L Offline
                                    Lost User
                                    wrote on last edited by
                                    #26

                                    Add a manifest to the package that requests admin rights.

                                    "It is a remarkable fact that despite the worldwide expenditure of perhaps US$50 billion since 1990, and the efforts of tens of thousands of scientists worldwide, no human climate signal has yet been detected that is distinct from natural variation." Bob Carter, Research Professor of Geology, James Cook University, Townsville

                                    1 Reply Last reply
                                    0
                                    • C Christian Graus

                                      Anna-Jayne Metcalfe wrote:

                                      I'm a bit surprised you're only discovering this now, to be honest.

                                      *grin* I've known for a long time that the registry is not the recommended way to do things, this is the first time I've touched it in ages ( I had to look up the code for accessing the registry in .NET ). In that sense, I'm not surprised there are issues, it's just frustrating, I mean, again, what's HKLM for, if not to store something machine wide ?

                                      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                                      A Offline
                                      A Offline
                                      Anna Jayne Metcalfe
                                      wrote on last edited by
                                      #27

                                      The preferred place to store machine wide stuff has been the application's app data folder (we use CSIDL_COMMON_APPDATA) for over 10 years now, so it's not like this is something new. :doh: It's all in Data and Settings Management[^].

                                      Anna :rose: Tech Blog | Visual Lint "Why would anyone prefer to wield a weapon that takes both hands at once, when they could use a lighter (and obviously superior) weapon that allows you to wield multiple ones at a time, and thus supports multi-paradigm carnage?"

                                      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