Results 1 to 11 of 11

Thread: Unique System Code

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    517

    Unique System Code

    Hello Everyone,

    I have a program that asks for a username and check it in DB along with hard disk code. The hdd code is unique for every computer.

    This method help my program identify a user and ensures that app runs on a selected systems only.

    However If multiple user accounts are created in Windows and people login then this method fails because hard disk is same for each one of them.

    Is there a way to get a unique code that will remain the same for each user as long as their user account exists or something.? Any idea how to solve this problem.

    Regards,
    GR
    Last edited by Shaggy Hiker; Feb 20th, 2021 at 10:40 AM.

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: Unique System Code

    Combine the HD code with the username to create a unique ID.
    What do you use to obtain the HD ID?

  3. #3
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Unique System Code

    I'm guessing he uses WMI for HD id.
    But you don't need the HD id if you just combine the username as suggested.
    And of course if you make this a web app the HD id goes completely useless.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    517

    Re: Unique System Code

    Thank you for your replies. Combining username and password does not help.

    Most people know each other usernames. So if I use some other username then the system will allow to login.

  5. #5
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,116

    Re: Unique System Code

    Quote Originally Posted by greatchap View Post
    Hello Everyone,

    I have a program that asks for a username and check it in DB along with hard disk code. The hdd code is unique for every computer.

    This method help my program identify a user and ensures that app runs on a selected systems only.

    However If multiple user accounts are created in Windows and people login then this method fails because hard disk is same for each one of them.

    Is there a way to get a unique code that will remain the same for each user as long as their user account exists or something.? Any idea how to solve this problem.

    Regards,
    GR
    You've done a poor job of explaining your goal and problem. You say you want to ensure that the app runs only on selected systems, so why do you care which user uses it? Or do you want to allow your software to ONLY run for specific user(s) on specific system(s)?

    For example, if you have User1, User2, and User3 as users, and you have PC1, PC2, and PC3 for PC's:

    Say you want User1 to use your software on PC1. But does that mean that User1 shouldn't be able to use your software on PC2 and PC3? And does it also mean that User2 and User3 shouldn't be able to use your software on PC1?

    If that is the case, good luck with that. Pretty much no matter what you do the end users will find a way to coordinate with each other so that they can work around any "user" level restrictions you put in place, especially if cost is an issue. Even if you require a username and password and do some sort of hardware checking, they can share the credentials with each other to beat your system.

    Basically, your software can't know with certainty who is sitting at the keyboard, so if User2 is sitting there and they know the process that User1 uses to access the software, then they are going to be able to use it. If you are running in to that situation routinely, then there is probably something about your software licensing model that makes it better for a company to game it than be legit.

    Good luck.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    517

    Re: Unique System Code

    Sorry if I did not explain the what I want properly.

    Lets take an example of User1, User2, User3. Currently user1 uses on PC1, user2 uses on PC2 and user3 uses on PC3. They won;t interchange. If username changes in PC1 then it wont work as program check the username field and hdd code field.

    However if user1,user2,user3 are using from same computer then just hdd code is wont work as it cannot differentiate. Your username and password if combined wont work because in same pc (assume users are logged via their respective user accounts) can enter another name and then product will work. For e.g. user1 can enter username as user2.

    Right now since PCs are different we are safe as each pc has unique hdd code. I wanted a way that for each user account if we could get a unique id that remains same as long as that user account is valid then I could use that in conjunction with hdd code.

  7. #7
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: Unique System Code

    Uh?
    When using the application do user fill in a username themselves?
    Don’t you use the windows login name?

  8. #8

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    517

    Re: Unique System Code

    No, the username is filled by the person. For each user account can a unique id be derived.

  9. #9
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,872

    Re: Unique System Code

    Then it will be difficult to prevent users sharing the username.

  10. #10
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Unique System Code

    Never rely on WMI for security. Better yet, never use it within any application. It was never meant for this.

    Just google things like WMI spoofing and you'll get plenty of hits on ways to subvert it (or worse).

    See Maintaining WMI Security for some common approaches used by sites to secure WMI against casual access on their PCs and servers.

  11. #11

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2004
    Location
    India
    Posts
    517

    Re: Unique System Code

    Okay. Thank you guys for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width