-
Notifications
You must be signed in to change notification settings - Fork 47
/
CrashPlan - Computer GUID.xml
46 lines (42 loc) · 1.46 KB
/
CrashPlan - Computer GUID.xml
1
<?xml version="1.0" encoding="UTF-8"?><extensionAttribute> <displayName>CrashPlan - Computer GUID</displayName> <displayInCategory>Backup</displayInCategory> <description>This attribute displays the computer GUID assigned to the machine by CrashPlan. This attribute applies to both Mac and Windows.</description> <dataType>integer</dataType> <scriptContentsMac>#!/bin/shif [ -f /Library/Application\ Support/CrashPlan/.identity ];thenecho "<result>`/bin/cat /Library/Application\ Support/CrashPlan/.identity | grep guid | sed s/guid\=//g`</result>"elseecho "<result>Not installed</result>"fi </scriptContentsMac> <scriptTypeWindows>VBScript</scriptTypeWindows> <scriptContentsWindows>On Error Resume Next'Declaration of Objects, Constants, VariablesDim objFSODim objTextFileDim strTextFileDim arrResultsDim strResultDim GUID'Set ObjectsSet objFSO = CreateObject("Scripting.FileSystemObject")'Read in CrashPlan GUIDSet objTextFile = objFSO.OpenTextFile("C:\ProgramData\CrashPlan\.identity")strTextFile = objTextFile.ReadAllobjTextFile.ClosearrResults=Split(strTextFile, Chr(13))For i = 0 to ubound(arrResults)If inStr(arrResults(i), "guid") > 0 Then strResult = Replace(arrResults(i), "guid=", "") GUID = strResult Exit forEnd ifNextIf GUID = "" ThenWScript.Echo "<result>Not installed</result>"ElseWScript.Echo "<result>" & GUID & "</result>"End If</scriptContentsWindows></extensionAttribute>