Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get Default Printer
Message
From
27/01/2000 13:54:55
 
 
To
27/01/2000 13:49:12
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00323190
Message ID:
00323713
Views:
22
>>>>I'm trying to use WSH to get the name of the current default printer, so I can temporarily set it, then reset it back.
>>>>
>>>>I'm doing this in NT 4.0. I'm refering to the WROX WSH book. They have an example of how to retrieve the name from the registry. However, the location doesn't exist.
>>>>
>>>>Does anyone know where I might find the printer name?
>>>>
>>>
>>>
>>>Do you know about
>>>
>>>?SET("PRINTER", 2)
>>>
>>>and SET PRINTER?
>>
>>Neither works inside WSH without a VFP session, guy!
>
>I thought the only reason he was using WSH in the first place was to look in the registry to find the current printer. If you can do it with VFP, you don't need WSH- right?

I'd think that there'd be every reason to use SET('PRINTER'), etc. inside VFP, SO I thought he wouldn't need the info there, too. The SetDefaultPrinter method does do something that VFP can't, but it can use all the rest of the details from VFP. I'd assume that you fall back on somethign when somethign else didn't work for you...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform