StumpedTechy
MIS
Okay here is a simple piece of code I am playing around with I am going to tweak it ALOT but the problem I have is I can't get the binary value to output.
As you can see these bottom 2 lines are my output attempts I also tried a msg box. I think this has to do with the fact this is a binary string value.
What I want is to do this - search the registry for 2 binary strings and report back the machine name and the 2 binary strings on the same line. The binary strings I would love if they were formatted as you see it when you use regedit but at this point I would be happy to get some kind of output from it.
Code:
Dim strDate, strTime, OUTPUT_FILE_NAME, strKeyPath1, strKeyPath2
strDate = Replace(Date,"/","-")
strTime = Replace(Time,":","-")
OUTPUT_FILE_NAME = "Checking UID on Active domain machines on "&strDate&" @ "&strTime&".csv"
strComputer = InputBox("1) Ensure Computer is added to the Domain. 2) Powered on. 3) Connected to the network. 4) Has no permissions issues.","Enter Computer Name Variable")
IF strComputer = "" THEN
WScript.Echo "No Computer Name was given or you clicked Cancel"
WScript.Quit
END IF
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFileOutput = objFSO.CreateTextFile(OUTPUT_FILE_NAME)
objFileoutput.WriteLine "Device name,LD Common,Intel Common"
const HKLM=&H80000002
Set ObjReg = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath1 = "SOFTWARE\LANDesk\Common Api"
strKeyPath2 = "SOFTWARE\Intel\LANDesk\Common Api"
ValueName = "UniqueID"
objReg.GetBinaryValue HKLM, strKeyPath1, ValueName, strValue
objReg.GetBinaryValue HKLM, strKeyPath2, ValueName, strValue1
'WScript.Echo "Value = " & strValue
'objFileoutput.WriteLine strComputer & ", " & strValue & ", " & strValue1
As you can see these bottom 2 lines are my output attempts I also tried a msg box. I think this has to do with the fact this is a binary string value.
What I want is to do this - search the registry for 2 binary strings and report back the machine name and the 2 binary strings on the same line. The binary strings I would love if they were formatted as you see it when you use regedit but at this point I would be happy to get some kind of output from it.