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. Database & SysAdmin
  3. System Admin
  4. XP Security problem

XP Security problem

Scheduled Pinned Locked Moved System Admin
securityhelpquestionannouncement
7 Posts 4 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.
  • J Offline
    J Offline
    John R Shaw
    wrote on last edited by
    #1

    We have a program that was written using Visual Basic, which has been working fine for 2 years on Win95/98/Me/NT4/NT2000. It does work properly when run on XP as anyone other than the adminstrator. The program generates a tab delimited file which stores user defined information as to how the software is to carry out some of its' taskes. How ever on XP when the user saves the data it is not saved, because the user does not have write pemission, in the directory where the program is located. How do I stop XP security from denying our software the right to update its' own data file. INTP

    A M 2 Replies Last reply
    0
    • J John R Shaw

      We have a program that was written using Visual Basic, which has been working fine for 2 years on Win95/98/Me/NT4/NT2000. It does work properly when run on XP as anyone other than the adminstrator. The program generates a tab delimited file which stores user defined information as to how the software is to carry out some of its' taskes. How ever on XP when the user saves the data it is not saved, because the user does not have write pemission, in the directory where the program is located. How do I stop XP security from denying our software the right to update its' own data file. INTP

      A Offline
      A Offline
      Alexander M
      wrote on last edited by
      #2

      XP and secure??? kewl... Don't try it, just do it! ;-)

      1 Reply Last reply
      0
      • J John R Shaw

        We have a program that was written using Visual Basic, which has been working fine for 2 years on Win95/98/Me/NT4/NT2000. It does work properly when run on XP as anyone other than the adminstrator. The program generates a tab delimited file which stores user defined information as to how the software is to carry out some of its' taskes. How ever on XP when the user saves the data it is not saved, because the user does not have write pemission, in the directory where the program is located. How do I stop XP security from denying our software the right to update its' own data file. INTP

        M Offline
        M Offline
        Mike Dimmick
        wrote on last edited by
        #3

        By default, users (i.e. accounts that are part of the Users group) are not allowed to write into the Program Files folder. You could make your users into Power Users (who do have permission), or you could change the permissions on the directory or, ideally, just the file so that the Users group has permission to write to this file. XP doesn't show the old security tab in the Properties box by default (when not connected to a domain) - to get it back, see http://www2.goldfisch.at/knowledge/241[^]. User preferences should really be stored in the registry or in the user's Local Settings or Application Data folders.

        J 1 Reply Last reply
        0
        • M Mike Dimmick

          By default, users (i.e. accounts that are part of the Users group) are not allowed to write into the Program Files folder. You could make your users into Power Users (who do have permission), or you could change the permissions on the directory or, ideally, just the file so that the Users group has permission to write to this file. XP doesn't show the old security tab in the Properties box by default (when not connected to a domain) - to get it back, see http://www2.goldfisch.at/knowledge/241[^]. User preferences should really be stored in the registry or in the user's Local Settings or Application Data folders.

          J Offline
          J Offline
          John R Shaw
          wrote on last edited by
          #4

          Thanks! The problem is that the User may be anyone that purchases our hardware (directly of indirectly). We (may) have no control of the End User and most of them may not even realize the file actualy exist. All the End User will know is that it did not save their information. The file could conceivably contain several hundred entries. INTP

          M 1 Reply Last reply
          0
          • J John R Shaw

            Thanks! The problem is that the User may be anyone that purchases our hardware (directly of indirectly). We (may) have no control of the End User and most of them may not even realize the file actualy exist. All the End User will know is that it did not save their information. The file could conceivably contain several hundred entries. INTP

            M Offline
            M Offline
            Mike Dimmick
            wrote on last edited by
            #5

            Hmm, in that case it sounds like a job for your setup tool. See the documentation for the SetNamedSecurityInfo function. Good coverage of security APIs in Programming Server-Side Applications for Windows 2000[^] and also in Programming Windows Security[^]. Specifically you need to give at least write access to the Users group. You'll need to look up the Security Identifier (SID) for the Users group on the local computer (see LookupAccountName). However, your customer's administrator could potentially have renamed the Users group, in which case this won't work. A well-known SID such as the Authenticated Users or Interactive SID might work better. Please tell me you're not using the Package and Deployment Wizard :wtf: - it's rather painful to add a custom install step, IIRC.

            J L 2 Replies Last reply
            0
            • M Mike Dimmick

              Hmm, in that case it sounds like a job for your setup tool. See the documentation for the SetNamedSecurityInfo function. Good coverage of security APIs in Programming Server-Side Applications for Windows 2000[^] and also in Programming Windows Security[^]. Specifically you need to give at least write access to the Users group. You'll need to look up the Security Identifier (SID) for the Users group on the local computer (see LookupAccountName). However, your customer's administrator could potentially have renamed the Users group, in which case this won't work. A well-known SID such as the Authenticated Users or Interactive SID might work better. Please tell me you're not using the Package and Deployment Wizard :wtf: - it's rather painful to add a custom install step, IIRC.

              J Offline
              J Offline
              John R Shaw
              wrote on last edited by
              #6

              Thanks! It looks like I now have a better chance at solving the problem. No I am not using the Package and Deployment Wizard. "Live long an prosper." INTP

              1 Reply Last reply
              0
              • M Mike Dimmick

                Hmm, in that case it sounds like a job for your setup tool. See the documentation for the SetNamedSecurityInfo function. Good coverage of security APIs in Programming Server-Side Applications for Windows 2000[^] and also in Programming Windows Security[^]. Specifically you need to give at least write access to the Users group. You'll need to look up the Security Identifier (SID) for the Users group on the local computer (see LookupAccountName). However, your customer's administrator could potentially have renamed the Users group, in which case this won't work. A well-known SID such as the Authenticated Users or Interactive SID might work better. Please tell me you're not using the Package and Deployment Wizard :wtf: - it's rather painful to add a custom install step, IIRC.

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

                Mike Dimmick wrote: it's rather painful to add a custom install step, IIRC :eek: :wtf: Please don't remind me of the nightmare :(( I'm still trying to forget the horror :omg: Paul ;)

                Garfield.Bark(); **---Configuration: garfield - Win32 Deworm---** C:\garfield.cpp(9) : error C2039: 'Bark' : is not a member of 'CCat'

                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