Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetProfileString / WriteProfileString
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00418967
Message ID:
00419000
Views:
22
>Thanks for your reply. (I remember that you had helped me before with using VFP's registry class.) How do I use the Window Script Host's Network object to set the default printer? Is it easier/better to use than your INIfiles class?
>

Assuming that you know the name of the printer (from AGETPRINTERS(), for example):

oWSHNet = CREATEOBJ('Wscript.Network')
oWSHNet.SetDefaultPrinter(cNameOfWindowsPrinter)
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
Next
Reply
Map
View

Click here to load this message in the networking platform