Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to Change the Windows
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00531534
Message ID:
00531579
Views:
12
George:

This sounds like the ticket! Presume this will be OK on WinNT Server (SBS). Thanks very much for your help. I will try this tomorrow at the office.

Are you aware of any online resource that details other WSH commands (if you are aware of any, that is) ?

Later buddy.

>>Friends:
>>
>>How do you change the Windows default printer from inside VFP?
>>
>>I am running a process that prints to the Windows default printer. I want to change the default printer within VFP, and after the process completes, reset the Windows default printer back to what it was.
>>
>>TIA
>
>Gary,
>
>While you can use modify the Win.ini file to change the default printer in Win9x, I'm not certain that it'll work under later versions. Therefore, I'd recommend the Windows Script Host's Network Object, like so
oNet = CREATEOBJECT("WScript.Network")
>oNet.SetDefaultPrinter(< printer name >)
and, yes, it works with local printers.
-=Gary
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform