• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UniqueID
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UniqueID


  • Subject: UniqueID
  • From: "Chris Wood" <email@hidden>
  • Date: Wed, 06 Feb 2002 05:55:37 +0000

Just to say cheers to everyone who advised me on obtaining a unique ID for a computers Hard disk. Here is my final routine which I think may be useful if you or your company is worried about somebody stealing your scripts. may not be foolproof but I am quite happy with it - unless someone can point out any flaws! Requires Jons Commands


property registeredID : 123456 --Initialize variable to hold the hard disk ID that the script is registered to
checkmachine()


on checkmachine()

--Create variable to hold the current hard disk ID
tell application "Finder" to set checkID to (creation date of startup disk)
set checkID to checkID as real

if checkID is not equal to registeredID then
if registeredID = 123456 then -- is an unregistered script
set registeredID to checkID
display dialog "Successfully Registered scriptName on this Mac." with icon 1 buttons "OK" default button 1
else --Script is registered to another hard disk
display dialog "scriptName is not registered to run on this computer." with icon 0 buttons "Quit" default button 1
--escape clause: To register this script to another hard disk press a secret predefined key combination when dismissing the dialog - script will then re-register itself next time it is run.
if ((keys pressed) as string) = "RCommandOption" then set registeredID to 123456
end if
return
end if
display dialog "Continue with rest of code"
end checkmachine

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


  • Prev by Date: Re: Set application preferred memory size (was Re: (no subject))
  • Next by Date: Files of folder returns 0 when count every folder returns correct number
  • Previous by thread: Re: Hiding Apps
  • Next by thread: Re: UniqueID
  • Index(es):
    • Date
    • Thread