I’ve tried several times to figure out what I’m doing wrong. I’ve attempted to rewrite
value “001e6700” of keys whose (value “00033009” of it as string =“02100000” ) of key (value “DefaultProfile” of it as string) of key “HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles” of registry
for all printers using a specific IP address. This is what I’ve come up with but I think I’m far from being correct in my relevance.
Q: exists value “Port” of it as string =“192.1.1.1” of key (value “Port” of it as string) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\Lexmark T520 (MS)\DsSpooler” of registry
q: if (exists keys whose (exists value "Port" of it AND value "Port" of it as string = "Microsoft Document Imaging Writer Port:") of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\" of registry) then (names of keys whose (exists value "Port" of it AND value "Port" of it as string = "Microsoft Document Imaging Writer Port:") of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\" of registry) else ("Printer not found.")
A: Microsoft Office Document Image Writer
T: 0.492 ms
I: plural string
This will work… Thank you so much Pmullins this put me alot further then were I was initially.
I’ve changed your relevence to
if (exists keys whose (exists value “Port” of it AND value “Port” of it as string = “IP_192.1.1.1”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers” of registry) then (names of keys whose (exists value “Port” of it AND value “Port” of it as string = “IP_192.1.1.1”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers” of registry) else (“Printer not found.”)
Which returns the name of the printer I’m looking for, which helps immensely.
Is there a way to just get a true/false response if the IP 192.1.1.1 is one of the values so that I can use it in my relevance?
Sure thing. If your only concern is whether at least one printer with any name, exists with that port number then I would imagine the “if” part of your relevence above will do what you require.
exists keys whose (exists value "Port" of it AND value "Port" of it as string = "IP_192.1.1.1") of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\" of registry
Of course I still might not understand what you’re looking for - it’s less than an hour until my weekend begins.