Jump to content











Photo
- - - - -

Uniquely identify Windows installation...


  • Please log in to reply
10 replies to this topic

#1 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 373 posts
  •  
    India

Posted 05 May 2013 - 11:04 AM

When Windows is installed does it create any file (name) or registry value that is unique to that installation ?

 

I'm developing a app that's natively portable. Every time the app is run on a new OS, the app needs to do something (eg. display the license). Any ideas ? 

 

Even if the user has installed, say, Win 7-32 on two partitions, I would like to identify one from the other.

 

If the app is run from one directory and then moved to another directory or drive, the app should be able to tell that the OS has not changed.

 

btw, this is not really related to Win - the app will run on any windows.

 

One way would be to get the volume id of the system drive. Any better way ?



#2 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 05 May 2013 - 02:22 PM

One way would be to get the volume id of the system drive. Any better way ?

 

Your app can generate some random ID on first run and store it in HKEY_LOCAL_MACHINE registry hive of the host Windows installation.



#3 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 373 posts
  •  
    India

Posted 05 May 2013 - 04:04 PM

then it would not be really 'stealth portable' (nothing left over when it exits).

 

what i decided to use is the value of 

 

[HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices]
"\\DosDevices\\C:" <--- using %systemdrive%
plus
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"InstallDate"


#4 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 05 May 2013 - 04:17 PM

Seems reasonable.  If you are really trying to do some sort of DRM/License, there are many pitfalls to this, since A legit user could be re-installing the OS, or in the case of a virtual machine, using the same VM image on multiple machines (i.e. cloned systems that look identical).  Even if they aren't cloned, in many enterprises, there is a single "image" used to build all the machines...They would have the same installation date and also the same system drive.

 

But, if all you want os some relative assurance that it is unique, then this may be good enough.

 

Just remember that nothing is ever "fool proof" and anything that can be "locked" can most likely be "unlocked".  It is all down to the cost and time to do it!

 

Scott



#5 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 373 posts
  •  
    India

Posted 05 May 2013 - 04:34 PM

no drm/license, i want a simple solution. i want to skip some init steps if the os is the same, that's all.



#6 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 05 May 2013 - 04:37 PM

then it would not be really 'stealth portable' (nothing left over when it exits).

 

Means? It can always store some value in the registry as a signature that it has been run this platform earlier.



#7 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 373 posts
  •  
    India

Posted 06 May 2013 - 08:24 AM

Many users, me included, like it that way. That's all.

 

see : http://www.portablef...are.com/faq.php



#8 steve6375

steve6375

    Platinum Member

  • Developer
  • 7033 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 06 May 2013 - 11:26 AM

no drm/license, i want a simple solution. i want to skip some init steps if the os is the same, that's all.

What init steps? Can't you tell if you have already done those init steps before?



#9 gbrao

gbrao

    Frequent Member

  • Advanced user
  • 373 posts
  •  
    India

Posted 06 May 2013 - 12:02 PM

if the prog is run with the same OS i don't need to do a few things. (i need to store some info in a ini file for each new OS)



#10 steve6375

steve6375

    Platinum Member

  • Developer
  • 7033 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 06 May 2013 - 12:14 PM

Why not just store the info every time?



#11 sbaeder

sbaeder

    Gold Member

  • .script developer
  • 1338 posts
  • Location:usa - massachusettes
  •  
    United States

Posted 09 May 2013 - 09:20 PM

then it would not be really 'stealth portable' (nothing left over when it exits).

 

According to the definition you also pointed at, leaving files in the TEMP areas is OK,  I guess if you are going to save this "ini" file on the USB drive and not on the machine, then even things like a combination of the "hostname" as well as the other things you mentioned should be sufficient "MOST" of the time :)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users