-
Notifications
You must be signed in to change notification settings - Fork 47
/
CrashPlan PROe - Computer GUID.xml
53 lines (47 loc) · 1.68 KB
/
CrashPlan PROe - Computer GUID.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?xml version="1.0" encoding="UTF-8"?>
<extensionAttribute>
<displayName>CrashPlan PROe - Computer GUID</displayName>
<displayInCategory>Backup</displayInCategory>
<description>This attribute displays the computer GUID assigned to the machine by CrashPlan PROe. This attribute applies to both Mac and Windows.</description>
<dataType>integer</dataType>
<scriptContentsMac>
#!/bin/sh
# Modified 1/24/13
# Third-Part Product page for CrashPlan PROe - https://jamfnation.jamfsoftware.com/viewProduct.html?id=217
if [ -f /Library/Application\ Support/CrashPlan/.identity ];then
echo "<result>`cat /Library/Application\ Support/CrashPlan/.identity | sed -n 's/guid=//p'`</result>"
else
echo "<result>Not installed</result>"
fi
</scriptContentsMac>
<scriptTypeWindows>VBScript</scriptTypeWindows>
<scriptContentsWindows>On Error Resume Next
'Declaration of Objects, Constants, Variables
Dim objFSO
Dim objTextFile
Dim strTextFile
Dim arrResults
Dim strResult
Dim GUID
'Set Objects
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Read in CrashPlan GUID
Set objTextFile = objFSO.OpenTextFile("C:\ProgramData\CrashPlan\.identity")
strTextFile = objTextFile.ReadAll
objTextFile.Close
arrResults=Split(strTextFile, Chr(13))
For i = 0 to ubound(arrResults)
If inStr(arrResults(i), "guid") > 0 Then
strResult = Replace(arrResults(i), "guid=", "")
strResult = Replace(strResult, chr(10), "", 1, -1)
GUID = Trim(strResult)
Exit for
End if
Next
If GUID = "" Then
WScript.Echo "<result>Not installed</result>"
Else
WScript.Echo "<result>" & GUID & "</result>"
End If
</scriptContentsWindows>
</extensionAttribute>