<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Unique computer id</title></head><body>
<div>Okay, here is the verdict. I created a stack with one
button, so that the person having the problem could run this with the
internet on, and off, and send me a report to compare the two. </div>
<div><br></div>
<div>With the internet on, Test Three produced several lines of info,
including the Physical Address. Test One produced the desired
info.</div>
<div><br></div>
<div>With the internet off, Test Three produced one line of text.
"Windows IP Configuration". That was it. Test
One was empty, accordingly.</div>
<div><br></div>
<div>Test Two worked in both instances, producing the same info.
My conclusion is that Test Two is more stable. Although in
reading thru the archives, there seemed to be a question about the
stability of such info. </div>
<div><br></div>
<div>As the problem seems only to happen on Windows, I did not test
Mac with this test. Far as I know, the Mac OSX code is stable
(stable meaning it gets some unique computer info on pretty much any
OSX system, and does not return "Nope".) I have no
code for Mac PPC. If anyone does, I'd love to have it. </div>
<div><br></div>
<div>### Mac OSX code ###</div>
<div><br></div>
<div>put shell("/sbin/ifconfig en0") into ifConfigs</div>
<div> if char 1 to 4 of ifConfigs =
"zsh:" then</div>
<div> return
"Nope"</div>
<div> else</div>
<div> get
matchText(ifconfigs,"(?s)ether (.*?) ",getInfo) # These are
spaces on either side of (.*?)</div>
<div> if it is false
then</div>
<div> return
"Nope"</div>
<div> end if</div>
<div>### end Mac OSX code ###</div>
<div><br></div>
<div><br></div>
<div><br></div>
<div><br></div>
<div><br></div>
<div>### The code in the button of the test stack sent to the user:
###</div>
<div><br></div>
<div>on mouseUp<br>
global checklist<br>
put firstTest() into testOne<br>
put secondTest("C") into testTwo<br>
put thirdTest() into testThree<br>
<br>
put the short date & return & the abbreviated time &
return & return into checklist<br>
put "Test One" & return &
base64encode(testOne) & return & return after checklist<br>
put "Test Two" & return & return &
base64encode(testTwo) after checklist<br>
put "Test Three" & return &
base64encode(testThree) after checklist<br>
<br>
put the effective filename of this stack into theFile<br>
set the itemDel to "/"<br>
put "checklist.txt" into the last item of theFile<br>
open file theFile for write<br>
write checklist to file theFile<br>
close file theFile<br>
<br>
answer "Checklist file has been created."<br>
<br>
end mouseUp<br>
<br>
function firstTest<br>
local checkpointCharley<br>
put (there is a file (specialFolderPath("system") &
"/IPCONFIG.EXE")) into winExists<br>
put (there is a file (specialFolderPath("system") &
"/SYSTEM32/IPCONFIG.EXE")) into sys32Exists<br>
if winExists or sys32Exists then<br>
put "EXISTS" & return after
checklist<br>
set the hideConsoleWindows to true<br>
put shell("ipconfig /all") into temp<br>
get matchText(temp,"Physical Address[\. ]*:
([A-Z0-9-]*)",checkpointCharley)<br>
else<br>
put "Default" & return after
checklist<br>
return "Default"<br>
end if<br>
return checkpointCharley<br>
end firstTest<br>
<br>
function secondTest driveCharley<br>
local checkpointJoe<br>
put char 1 of driveCharley & ":" into pDisk<br>
set the hideConsoleWindows to true<br>
put shell("dir " & pDisk) into tDirData<br>
get matchText(tDirData,"Volume Serial Number is
(.*)\n",checkpointJoe)<br>
if it is true then<br>
return checkpointJoe<br>
else if it is empty then<br>
return "Empty"<br>
else<br>
return "Other"<br>
end if<br>
end secondTest<br>
<br>
function thirdTest<br>
local checkpointMajor<br>
put (there is a file (specialFolderPath("system") &
"/IPCONFIG.EXE")) into winExists<br>
put (there is a file (specialFolderPath("system") &
"/SYSTEM32/IPCONFIG.EXE")) into sys32Exists<br>
if winExists or sys32Exists then<br>
set the hideConsoleWindows to true<br>
put shell("ipconfig /all") into
checkpointMajor<br>
end if<br>
return checkpointMajor<br>
end thirdTest</div>
<div><br></div>
<div>### end test code ###</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div>Mac and Windows shareware games<br>
http://www.gypsyware.com</div>
</body>
</html>