Hello,
I need some help with the code below. This code will fail to run successfully if this location in the registry doesnt exist. HKCU\\Printers\\DeviceOld. That would be great if we could see if it is valid before we proceed with the function or popup a message saying the location doesnt exist. I would appreciate any help.
Thanks
Paul,
var WshShell = WScript.CreateObject ( "WScript.Shell" );
var retval = "";
var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile("c:\\Default.txt", true);
retval += DefaultPrinters(retval);
a.WriteLine ("\r\nYour Default Printer is a: " +retval);
function DefaultPrinters(DefaultPrinter)
{
retval = WshShell.RegRead ("HKCU\\Printers\\DeviceOld");
return retval;
}
I need some help with the code below. This code will fail to run successfully if this location in the registry doesnt exist. HKCU\\Printers\\DeviceOld. That would be great if we could see if it is valid before we proceed with the function or popup a message saying the location doesnt exist. I would appreciate any help.
Thanks
Paul,
var WshShell = WScript.CreateObject ( "WScript.Shell" );
var retval = "";
var fso = new ActiveXObject("Scripting.FileSystemObject");
var a = fso.CreateTextFile("c:\\Default.txt", true);
retval += DefaultPrinters(retval);
a.WriteLine ("\r\nYour Default Printer is a: " +retval);
function DefaultPrinters(DefaultPrinter)
{
retval = WshShell.RegRead ("HKCU\\Printers\\DeviceOld");
return retval;
}