Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for prodid.kix

(view source code of prodid.kix as plain text)

  1. : ProdID.kix,  Version 1.00 for Windows NT 4 / 2000 / XP
  2. : Display Windows' Product ID
  3. ;
  4. : Usage:  KIX32  PRODID.KIX
  5. ;
  6. : Written by Rob van der Woude
  7. : http://www.robvanderwoude.com
  8.  
  9. ; Read value from registry
  10. $ProductID = ReadValue("HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion","ProductId")
  11.  
  12. ; Display result or error message
  13. If @ERROR = 0
  14. 	? "ProductID=$ProductID"
  15. Else
  16. 	? "Error reading product ID"
  17. Endif
  18. ?
  19.  
  20. ; Done
  21. Exit @ERROR
  22.  

page last uploaded: 2017-08-21, 14:26