Wise112 Posted July 16, 2010 Posted July 16, 2010 Hello All, I was wondering if it was at all possible to make a location within the registry a variable; $var1 = PRINTER1 ie: $port = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\$var1", "Port") If anyone could give me some direction it would be great! Tim
Wise112 Posted July 16, 2010 Author Posted July 16, 2010 I have managed to find a workaround which seems to be working; Thanks all! $printername = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device") $printername = StringTrimRight($printername, 15) $RegKey = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\" & $printername & "\" $RegKey2 = RegRead($regkey,"Port") MsgBox(0, "Your Printer Port is ", $Regkey2)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now