'ADOBE SYSTEMS INCORPORATED
'Copyright (C) 2003-2016 Adobe Systems Incorporated
'All rights reserved.

'NOTICE: Adobe permits you to use, modify, and distribute this file
'in accordance with the terms of the Adobe license agreement
'accompanying it. If you have received this file from a source other
'than Adobe, then your use, modification, or distribution of it
'requires the prior written permission of Adobe.


' TITLE: SWID_Tag_Scan.vbs
' PURPOSE:  The intent of this script is to demonstrate one way to help differentiate the type of Acrobat DC install on a machine.
' DESCRIPTION:  This VBScript tests for the location of four possible SWID tag files used for Adobe Acrobat Pro DC/2015
' It uses an IF statement to test if the *.swidtag file is located in the directory
' "C:\ProgramData\regid.1986-12.com.adobe\"
' If the file exists the script will continue to test for:
'   - Encoded Serial Number format
'   - product_title
'   - version: major
'   - channel_type
'   - customer_type
'   - activation_status
' Then script will proceed to write out the resultant data found into a text file named SWID_Tag_Scan.txt.
' Note: The output file will be written to the current user's desktop
'
'  QUESTIONS:  scordero@adobe.com


'Option Explicit
Const ForReading = 1, ForWriting = 2
Dim objFSO, f, strLine, objReadFile

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set oShell = CreateObject("WScript.Shell")

homeDirectory = CreateObject("WScript.Shell").ExpandEnvironmentStrings("%UserProfile%")

Set fso = CreateObject("Scripting.FileSystemObject")


'This output path for the object f will need to be changed in your script.
Set f = ObjFSO.OpenTextFile(homeDirectory & "\Desktop\SWID_Tag_Scan.txt", ForWriting, True)

Set objWMIService = GetObject( "winmgmts:\\.\root\cimv2" )
Set colItems = objWMIService.ExecQuery( "Select * from Win32_ComputerSystem" )
For Each objItem in colItems
    strComputerName = objItem.Name
    'WScript.Echo "Computer Name: " & strComputerName
  f.WriteLine("Computer Name: " & strComputerName)
f.WriteLine("**********************************************************************")

Next


If (objFSO.FileExists("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V7{}AcrobatETLA-12-Win-GM-MUL.swidtag")) Then
Set objReadFile = objFSO.OpenTextFile("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V7{}AcrobatETLA-12-Win-GM-MUL.swidtag", 1, False)
  'WScript.Echo("File V7{}AcrobatETLA-12-Win-GM-MUL exists!")
  f.WriteLine("File V7{}AcrobatETLA-12-Win-GM-MUL exists!")
 

'End if

Do Until objReadFile.AtEndOfStream

strLine = objReadFile.ReadLine

strLine = trim(strLine)

'##################################[serial_number]#########################################################

if instr(strLine, "9707") Then

  'WScript.Echo("9707 exists!")
  f.WriteLine("Serial Number: 9707")

End If


if instr(strLine, "9101") Then

  'WScript.Echo("9101 exists!")
  f.WriteLine("Serial Number: 9101 ")

End If



if instr(strLine, "9096") Then

  'WScript.Echo("9096 exists!")
  f.WriteLine("Serial Number: 9096")

End If

'##################################[product_title]#########################################################
if instr(strLine, "<swid:product_title>Adobe Acrobat</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Adobe Acrobat</swid:product_title> exists!")
  f.WriteLine("product_title:  Adobe Acrobat")


End If

if instr(strLine, "<swid:product_title>Acrobat XI Pro</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Pro")


End If


if instr(strLine, "<swid:product_title>Acrobat XI Standard</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Standard")


End If

'##################################[product_version - major]#########################################################

if instr(strLine, "<swid:major>12</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Major Number:  12")

End If

if instr(strLine, "<swid:major>1</swid:major>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Number:  1")

End If

if instr(strLine, "<swid:major>11</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Major Number:  11")

End If



'##################################[product_version - minor]#########################################################



if instr(strLine, "<swid:minor>1</swid:minor>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Minor Number:  1")

End If

if instr(strLine, "<swid:minor>0</swid:minor>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Minor Number:  0")

End If


'##################################[channel_type]#########################################################

if instr(strLine, "<swid:channel_type>VOLUME</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>VOLUME</swid:channel_type> exists!")
  f.WriteLine("channel_type:  VOLUME")

End If


if instr(strLine, "<swid:channel_type>SUBSCRIPTION</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>SUBSCRIPTION</swid:customer_type> exists!")
  f.WriteLine("channel_type:  SUBSCRIPTION")

End If

if instr(strLine, "<swid:channel_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("channel_type:  UNKNOWN")

End If

if instr(strLine, "<swid:channel_type>RETAIL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>RETAIL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  RETAIL")

End If


if instr(strLine, "<swid:channel_type>TRIAL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>TRIAL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  TRIAL")

End If

'##################################[customer_type]#########################################################

if instr(strLine, "<swid:customer_type>VOLUME</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>VOLUME</swid:customer_type> exists!")
  f.WriteLine("customer_type:  VOLUME")

End If



if instr(strLine, "<swid:customer_type>RETAIL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>RETAIL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  RETAIL")


End If



if instr(strLine, "<swid:customer_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("customer_type:  UNKNOWN")


End If

if instr(strLine, "<swid:customer_type>TRIAL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>TRIAL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  TRIAL")


End If


'##################################[activation_status]#########################################################

if instr(strLine, "<swid:activation_status>activated</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>activated</swid:activation_status> exists!")
  f.WriteLine("activation_status:  activated")

End If

if instr(strLine, "<swid:activation_status>serialized</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>serialized</swid:activation_status> exists!")
  f.WriteLine("activation_status:  serialized")

End If

if instr(strLine, "<swid:activation_status>trial</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>trial</swid:activation_status> exists!")
  f.WriteLine("activation_status:  trial")

End If

if instr(strLine, "<swid:activation_status>unlicensed</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>unlicensed</swid:activation_status> exists!")
  f.WriteLine("activation_status:  unlicensed")

End If

Loop

'WScript.Echo strLine
f.WriteLine(strLine)
f.WriteLine("**********************************************************************")
'set objFSO = nothing
 Else
  f.WriteLine("File V7{}AcrobatETLA-12-Win-GM-MUL does NOT exist!")
  
  f.WriteLine(strLine)
f.WriteLine("**********************************************************************")


'wscript.quit()
End if

'**********************************************************************


If (objFSO.FileExists("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V7{}AcrobatESR-12-Win-GM-en_US.swidtag")) Then
Set objReadFile = objFSO.OpenTextFile("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V7{}AcrobatESR-12-Win-GM-en_US.swidtag", 1, False)
  'WScript.Echo("File V7{}AcrobatESR-12-Win-GM-en_US exists!")
  f.WriteLine("File V7{}AcrobatESR-12-Win-GM-en_US exists!")


'End if

Do Until objReadFile.AtEndOfStream

strLine = objReadFile.ReadLine

strLine = trim(strLine)

'##################################[serial_number]#########################################################

if instr(strLine, "9707") Then

  'WScript.Echo("9707 exists!")
  f.WriteLine("Serial Number: 9707")

End If


if instr(strLine, "9101") Then

  'WScript.Echo("9101 exists!")
  f.WriteLine("Serial Number: 9101 ")

End If



if instr(strLine, "9096") Then

  'WScript.Echo("9096 exists!")
  f.WriteLine("Serial Number: 9096")

End If

'##################################[product_title]#########################################################
if instr(strLine, "<swid:product_title>Adobe Acrobat</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Adobe Acrobat</swid:product_title> exists!")
  f.WriteLine("product_title:  Adobe Acrobat")

End If

if instr(strLine, "<swid:product_title>Acrobat XI Pro</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Pro")


End If

if instr(strLine, "<swid:product_title>Acrobat XI Standard</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Standard")


End If

'##################################[product_version - major]#########################################################


if instr(strLine, "<swid:major>12</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Number:  12")

End If

if instr(strLine, "<swid:major>1</swid:major>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Number:  1")

End If

if instr(strLine, "<swid:major>11</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Major Number:  11")

End If

'##################################[product_version - minor]#########################################################



if instr(strLine, "<swid:minor>1</swid:minor>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Minor Number:  1")

End If

if instr(strLine, "<swid:minor>0</swid:minor>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Minor Number:  0")

End If


'##################################[channel_type]#########################################################


if instr(strLine, "<swid:channel_type>VOLUME</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>VOLUME</swid:channel_type> exists!")
  f.WriteLine("channel_type:  VOLUME")

End If


if instr(strLine, "<swid:channel_type>SUBSCRIPTION</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>SUBSCRIPTION</swid:customer_type> exists!")
  f.WriteLine("channel_type:  SUBSCRIPTION")

End If

if instr(strLine, "<swid:channel_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("channel_type:  UNKNOWN")

End If

if instr(strLine, "<swid:channel_type>RETAIL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>RETAIL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  RETAIL")

End If


if instr(strLine, "<swid:channel_type>TRIAL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>TRIAL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  TRIAL")

End If
'##################################[customer_type]#########################################################

if instr(strLine, "<swid:customer_type>VOLUME</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>VOLUME</swid:customer_type> exists!")
  f.WriteLine("customer_type:  VOLUME")

End If



if instr(strLine, "<swid:customer_type>RETAIL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>RETAIL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  RETAIL")


End If



if instr(strLine, "<swid:customer_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("customer_type:  UNKNOWN")


End If

if instr(strLine, "<swid:customer_type>TRIAL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>TRIAL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  TRIAL")


End If


'##################################[activation_status]#########################################################

if instr(strLine, "<swid:activation_status>activated</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>activated</swid:activation_status> exists!")
  f.WriteLine("activation_status:  activated")

End If

if instr(strLine, "<swid:activation_status>serialized</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>serialized</swid:activation_status> exists!")
  f.WriteLine("activation_status:  serialized")

End If

if instr(strLine, "<swid:activation_status>trial</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>trial</swid:activation_status> exists!")
  f.WriteLine("activation_status:  trial")

End If

if instr(strLine, "<swid:activation_status>unlicensed</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>unlicensed</swid:activation_status> exists!")
  f.WriteLine("activation_status:  unlicensed")

End If

Loop

'WScript.Echo strLine
f.WriteLine(strLine)
f.WriteLine("**********************************************************************")

'set objFSO = nothing

  Else
   f.WriteLine("File V7{}AcrobatESR-12-Win-GM-en_US does not exist!")
   
   f.WriteLine(strLine)
f.WriteLine("**********************************************************************")

   
'wscript.quit()
End if

'**********************************************************************


If (objFSO.FileExists("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V6{}AcrobatStd-AS2-Win-GM-MUL.swidtag")) Then
Set objReadFile = objFSO.OpenTextFile("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V6{}AcrobatStd-AS2-Win-GM-MUL.swidtag", 1, False)
  'WScript.Echo("File V6{}AcrobatStd-AS2-Win-GM-MUL exists!")
  f.WriteLine("File V6{}AcrobatStd-AS2-Win-GM-MUL exists!")

'End if

Do Until objReadFile.AtEndOfStream

strLine = objReadFile.ReadLine

strLine = trim(strLine)
'##################################[serial_number]#########################################################

if instr(strLine, "9707") Then

  'WScript.Echo("9707 exists!")
  f.WriteLine("Serial Number: 9707")

End If


if instr(strLine, "9101") Then

  'WScript.Echo("9101 exists!")
  f.WriteLine("Serial Number: 9101 ")

End If



if instr(strLine, "9096") Then

  'WScript.Echo("9096 exists!")
  f.WriteLine("Serial Number: 9096")

End If

'##################################[product_title]#########################################################
if instr(strLine, "<swid:product_title>Adobe Acrobat</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Adobe Acrobat</swid:product_title> exists!")
  f.WriteLine("product_title:  Adobe Acrobat")

End If

if instr(strLine, "<swid:product_title>Acrobat XI Pro</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Pro")


End If

if instr(strLine, "<swid:product_title>Acrobat XI Standard</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Standard")


End If

'##################################[product_version - major]#########################################################

if instr(strLine, "<swid:major>12</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Number:  12")

End If

if instr(strLine, "<swid:major>1</swid:major>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Number:  1")

End If

if instr(strLine, "<swid:major>11</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Major Number:  11")

End If

'##################################[product_version - minor]#########################################################



if instr(strLine, "<swid:minor>1</swid:minor>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Minor Number:  1")

End If

if instr(strLine, "<swid:minor>0</swid:minor>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Minor Number:  0")

End If

'##################################[channel_type]#########################################################

if instr(strLine, "<swid:channel_type>VOLUME</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>VOLUME</swid:channel_type> exists!")
  f.WriteLine("channel_type:  VOLUME")

End If


if instr(strLine, "<swid:channel_type>SUBSCRIPTION</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>SUBSCRIPTION</swid:customer_type> exists!")
  f.WriteLine("channel_type:  SUBSCRIPTION")

End If

if instr(strLine, "<swid:channel_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("channel_type:  UNKNOWN")

End If

if instr(strLine, "<swid:channel_type>RETAIL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>RETAIL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  RETAIL")

End If


if instr(strLine, "<swid:channel_type>TRIAL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>TRIAL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  TRIAL")

End If

'##################################[customer_type]#########################################################

if instr(strLine, "<swid:customer_type>VOLUME</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>VOLUME</swid:customer_type> exists!")
  f.WriteLine("customer_type:  VOLUME")

End If



if instr(strLine, "<swid:customer_type>RETAIL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>RETAIL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  RETAIL")


End If



if instr(strLine, "<swid:customer_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("customer_type:  UNKNOWN")


End If

if instr(strLine, "<swid:customer_type>TRIAL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>TRIAL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  TRIAL")


End If


'##################################[activation_status]#########################################################

if instr(strLine, "<swid:activation_status>activated</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>activated</swid:activation_status> exists!")
  f.WriteLine("activation_status:  activated")

End If

if instr(strLine, "<swid:activation_status>serialized</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>serialized</swid:activation_status> exists!")
  f.WriteLine("activation_status:  serialized")

End If

if instr(strLine, "<swid:activation_status>trial</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>trial</swid:activation_status> exists!")
  f.WriteLine("activation_status:  trial")

End If

if instr(strLine, "<swid:activation_status>unlicensed</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>unlicensed</swid:activation_status> exists!")
  f.WriteLine("activation_status:  unlicensed")

End If

Loop

'WScript.Echo strLine
f.WriteLine(strLine)
f.WriteLine("**********************************************************************")

'set objFSO = nothing
Else
  f.WriteLine("File V6{}AcrobatStd-AS2-Win-GM-MUL does NOT exists!")
  
  f.WriteLine(strLine)
f.WriteLine("**********************************************************************")


'wscript.quit()
End if


'**********************************************************************
If (objFSO.FileExists("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V7{}CreativeCloudEnt-1.0-Win-GM-MUL.swidtag")) Then
Set objReadFile = objFSO.OpenTextFile("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V7{}CreativeCloudEnt-1.0-Win-GM-MUL.swidtag", 1, False)
  'WScript.Echo("File V7{}CreativeCloudEnt-1.0-Win-GM-MUL exists!")
  f.WriteLine("File V7{}CreativeCloudEnt-1.0-Win-GM-MUL exists!")
 

'End if

Do Until objReadFile.AtEndOfStream

strLine = objReadFile.ReadLine

strLine = trim(strLine)

'##################################[serial_number]#########################################################

if instr(strLine, "9707") Then

  'WScript.Echo("9707 exists!")
  f.WriteLine("Serial Number: 9707")

End If


if instr(strLine, "9101") Then

  'WScript.Echo("9101 exists!")
  f.WriteLine("Serial Number: 9101 ")

End If



if instr(strLine, "9096") Then

  'WScript.Echo("9096 exists!")
  f.WriteLine("Serial Number: 9096")

End If

'##################################[product_title]#########################################################
if instr(strLine, "<swid:product_title>Adobe Acrobat</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Adobe Acrobat</swid:product_title> exists!")
  f.WriteLine("product_title:  Adobe Acrobat")

End If

if instr(strLine, "<swid:product_title>Acrobat XI Pro</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Pro")


End If

if instr(strLine, "<swid:product_title>Acrobat XI Standard</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Standard")


End If

'##################################[product_version - major]#########################################################

if instr(strLine, "<swid:major>12</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Number:  12")

End If

if instr(strLine, "<swid:major>1</swid:major>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Number:  1")

End If

if instr(strLine, "<swid:major>11</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Major Number:  11")

End If

'##################################[product_version - minor]#########################################################


if instr(strLine, "<swid:minor>1</swid:minor>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Minor Number:  1")

End If

if instr(strLine, "<swid:minor>0</swid:minor>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Minor Number:  0")

End If

'##################################[channel_type]#########################################################

if instr(strLine, "<swid:channel_type>VOLUME</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>VOLUME</swid:channel_type> exists!")
  f.WriteLine("channel_type:  VOLUME")

End If


if instr(strLine, "<swid:channel_type>SUBSCRIPTION</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>SUBSCRIPTION</swid:customer_type> exists!")
  f.WriteLine("channel_type:  SUBSCRIPTION")

End If

if instr(strLine, "<swid:channel_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("channel_type:  UNKNOWN")

End If

if instr(strLine, "<swid:channel_type>RETAIL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>RETAIL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  RETAIL")

End If


if instr(strLine, "<swid:channel_type>TRIAL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>TRIAL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  TRIAL")

End If

'##################################[customer_type]#########################################################

if instr(strLine, "<swid:customer_type>VOLUME</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>VOLUME</swid:customer_type> exists!")
  f.WriteLine("customer_type:  VOLUME")

End If



if instr(strLine, "<swid:customer_type>RETAIL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>RETAIL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  RETAIL")


End If



if instr(strLine, "<swid:customer_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("customer_type:  UNKNOWN")


End If

if instr(strLine, "<swid:customer_type>TRIAL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>TRIAL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  TRIAL")


End If


'##################################[activation_status]#########################################################

if instr(strLine, "<swid:activation_status>activated</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>activated</swid:activation_status> exists!")
  f.WriteLine("activation_status:  activated")

End If

if instr(strLine, "<swid:activation_status>serialized</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>serialized</swid:activation_status> exists!")
  f.WriteLine("activation_status:  serialized")

End If

if instr(strLine, "<swid:activation_status>trial</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>trial</swid:activation_status> exists!")
  f.WriteLine("activation_status:  trial")

End If

if instr(strLine, "<swid:activation_status>unlicensed</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>unlicensed</swid:activation_status> exists!")
  f.WriteLine("activation_status:  unlicensed")

End If

Loop

'WScript.Echo strLine
f.WriteLine(strLine)
f.WriteLine("**********************************************************************")

'set objFSO = nothing
 Else
   f.WriteLine("File V7{}CreativeCloudEnt-1.0-Win-GM-MUL does not exist!")
   
   f.WriteLine(strLine)
f.WriteLine("**********************************************************************")

   
'wscript.quit()
End if

'**********************************************************************
If (objFSO.FileExists("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V6{}AcrobatPro-AS2-Win-GM-MUL.swidtag")) Then
Set objReadFile = objFSO.OpenTextFile("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V6{}AcrobatPro-AS2-Win-GM-MUL.swidtag", 1, False)
  'WScript.Echo("File V7{}CreativeCloudEnt-1.0-Win-GM-MUL exists!")
  f.WriteLine("File V6{}AcrobatPro-AS2-Win-GM-MUL exists!")
 

'End if

Do Until objReadFile.AtEndOfStream

strLine = objReadFile.ReadLine

strLine = trim(strLine)

'##################################[serial_number]#########################################################

if instr(strLine, "9707") Then

  'WScript.Echo("9707 exists!")
  f.WriteLine("Serial Number: 9707")

End If


if instr(strLine, "9101") Then

  'WScript.Echo("9101 exists!")
  f.WriteLine("Serial Number: 9101 ")

End If



if instr(strLine, "9096") Then

  'WScript.Echo("9096 exists!")
  f.WriteLine("Serial Number: 9096")

End If

'##################################[product_title]#########################################################
if instr(strLine, "<swid:product_title>Adobe Acrobat</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Adobe Acrobat</swid:product_title> exists!")
  f.WriteLine("product_title:  Adobe Acrobat")

End If

if instr(strLine, "<swid:product_title>Acrobat XI Pro</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Pro")


End If

if instr(strLine, "<swid:product_title>Acrobat XI Standard</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Standard")


End If

'##################################[product_version - major]#########################################################

if instr(strLine, "<swid:major>12</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Number:  12")

End If

if instr(strLine, "<swid:major>1</swid:major>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Number:  1")

End If

if instr(strLine, "<swid:major>11</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Major Number:  11")

End If

'##################################[product_version - minor]#########################################################


if instr(strLine, "<swid:minor>1</swid:minor>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Minor Number:  1")

End If

if instr(strLine, "<swid:minor>0</swid:minor>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Minor Number:  0")

End If

'##################################[channel_type]#########################################################

if instr(strLine, "<swid:channel_type>VOLUME</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>VOLUME</swid:channel_type> exists!")
  f.WriteLine("channel_type:  VOLUME")

End If


if instr(strLine, "<swid:channel_type>SUBSCRIPTION</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>SUBSCRIPTION</swid:customer_type> exists!")
  f.WriteLine("channel_type:  SUBSCRIPTION")

End If

if instr(strLine, "<swid:channel_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("channel_type:  UNKNOWN")

End If

if instr(strLine, "<swid:channel_type>RETAIL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>RETAIL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  RETAIL")

End If


if instr(strLine, "<swid:channel_type>TRIAL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>TRIAL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  TRIAL")

End If

'##################################[customer_type]#########################################################

if instr(strLine, "<swid:customer_type>VOLUME</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>VOLUME</swid:customer_type> exists!")
  f.WriteLine("customer_type:  VOLUME")

End If



if instr(strLine, "<swid:customer_type>RETAIL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>RETAIL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  RETAIL")


End If



if instr(strLine, "<swid:customer_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("customer_type:  UNKNOWN")


End If

if instr(strLine, "<swid:customer_type>TRIAL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>TRIAL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  TRIAL")


End If


'##################################[activation_status]#########################################################

if instr(strLine, "<swid:activation_status>activated</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>activated</swid:activation_status> exists!")
  f.WriteLine("activation_status:  activated")

End If

if instr(strLine, "<swid:activation_status>serialized</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>serialized</swid:activation_status> exists!")
  f.WriteLine("activation_status:  serialized")

End If

if instr(strLine, "<swid:activation_status>trial</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>trial</swid:activation_status> exists!")
  f.WriteLine("activation_status:  trial")

End If

if instr(strLine, "<swid:activation_status>unlicensed</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>unlicensed</swid:activation_status> exists!")
  f.WriteLine("activation_status:  unlicensed")

End If

Loop

'WScript.Echo strLine
f.WriteLine(strLine)
f.WriteLine("**********************************************************************")

set objFSO = nothing
 Else
   f.WriteLine("File V6{}AcrobatPro-AS2-Win-GM-MUL.swidtag does not exist!")
   
   f.WriteLine(strLine)
f.WriteLine("**********************************************************************")

   
'wscript.quit()
End if

'**********************************************************************

If (objFSO.FileExists("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V7{}AcrobatESR-17-Win-GM-en_US.swidtag")) Then
Set objReadFile = objFSO.OpenTextFile("C:\ProgramData\regid.1986-12.com.adobe\regid.1986-12.com.adobe_V7{}AcrobatESR-17-Win-GM-en_US.swidtag", 1, False)
  'WScript.Echo("File V7{}AcrobatESR-17-Win-GM-en_US exists!")
  f.WriteLine("File V7{}AcrobatESR-17-Win-GM-en_US exists!")


'End if

Do Until objReadFile.AtEndOfStream

strLine = objReadFile.ReadLine

strLine = trim(strLine)

'##################################[serial_number]#########################################################

if instr(strLine, "9707") Then

  'WScript.Echo("9707 exists!")
  f.WriteLine("Serial Number: 9707")

End If


if instr(strLine, "9101") Then

  'WScript.Echo("9101 exists!")
  f.WriteLine("Serial Number: 9101 ")

End If



if instr(strLine, "9096") Then

  'WScript.Echo("9096 exists!")
  f.WriteLine("Serial Number: 9096")

End If

'##################################[product_title]#########################################################
if instr(strLine, "<swid:product_title>Adobe Acrobat</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Adobe Acrobat</swid:product_title> exists!")
  f.WriteLine("product_title:  Adobe Acrobat")

End If

if instr(strLine, "<swid:product_title>Acrobat XI Pro</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Pro")


End If

if instr(strLine, "<swid:product_title>Acrobat XI Standard</swid:product_title>") Then

  'WScript.Echo("<swid:product_title>Acrobat XI Pro</swid:product_title> exists!")
  f.WriteLine("product_title:  Acrobat XI Standard")


End If

'##################################[product_version - major]#########################################################


if instr(strLine, "<swid:major>12</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Number:  12")

End If

if instr(strLine, "<swid:major>1</swid:major>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Number:  1")

End If

if instr(strLine, "<swid:major>11</swid:major>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Major Number:  11")

End If

'##################################[product_version - minor]#########################################################



if instr(strLine, "<swid:minor>1</swid:minor>") Then

  'WScript.Echo("<swid:major>12</swid:major> exists!")
  f.WriteLine("Version Minor Number:  1")

End If

if instr(strLine, "<swid:minor>0</swid:minor>") Then

  'WScript.Echo("<swid:major>1</swid:major> exists!")
  f.WriteLine("Creative Cloud Version Minor Number:  0")

End If


'##################################[channel_type]#########################################################


if instr(strLine, "<swid:channel_type>VOLUME</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>VOLUME</swid:channel_type> exists!")
  f.WriteLine("channel_type:  VOLUME")

End If


if instr(strLine, "<swid:channel_type>SUBSCRIPTION</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>SUBSCRIPTION</swid:customer_type> exists!")
  f.WriteLine("channel_type:  SUBSCRIPTION")

End If

if instr(strLine, "<swid:channel_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:channel_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("channel_type:  UNKNOWN")

End If

if instr(strLine, "<swid:channel_type>RETAIL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>RETAIL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  RETAIL")

End If


if instr(strLine, "<swid:channel_type>TRIAL</swid:channel_type>") Then

  'WScript.Echo("<swid:channel_type>TRIAL</swid:channel_type> exists!")
  f.WriteLine("channel_type:  TRIAL")

End If
'##################################[customer_type]#########################################################

if instr(strLine, "<swid:customer_type>VOLUME</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>VOLUME</swid:customer_type> exists!")
  f.WriteLine("customer_type:  VOLUME")

End If



if instr(strLine, "<swid:customer_type>RETAIL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>RETAIL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  RETAIL")


End If



if instr(strLine, "<swid:customer_type>UNKNOWN</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>UNKNOWN</swid:customer_type> exists!")
  f.WriteLine("customer_type:  UNKNOWN")


End If

if instr(strLine, "<swid:customer_type>TRIAL</swid:customer_type>") Then

  'WScript.Echo("<swid:customer_type>TRIAL</swid:customer_type> exists!")
  f.WriteLine("customer_type:  TRIAL")


End If


'##################################[activation_status]#########################################################

if instr(strLine, "<swid:activation_status>activated</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>activated</swid:activation_status> exists!")
  f.WriteLine("activation_status:  activated")

End If

if instr(strLine, "<swid:activation_status>serialized</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>serialized</swid:activation_status> exists!")
  f.WriteLine("activation_status:  serialized")

End If

if instr(strLine, "<swid:activation_status>trial</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>trial</swid:activation_status> exists!")
  f.WriteLine("activation_status:  trial")

End If

if instr(strLine, "<swid:activation_status>unlicensed</swid:activation_status>") Then

  'WScript.Echo("<swid:activation_status>unlicensed</swid:activation_status> exists!")
  f.WriteLine("activation_status:  unlicensed")

End If

Loop

'WScript.Echo strLine
f.WriteLine(strLine)
f.WriteLine("**********************************************************************")

'set objFSO = nothing

  Else
   f.WriteLine("File V7{}AcrobatESR-17-Win-GM-en_US does not exist!")
   
   f.WriteLine(strLine)
f.WriteLine("**********************************************************************")

   
wscript.quit()
End if

'**********************************************************************