Hi Michael,
You can do this with the
WScript.Network object. Something like this will do the trick:
local loNetwork
loNetwork = create("WScript.Network")
loNetwork.SetDefultPrinter("\\Server\Print1")
MSDN covers the topic in the Windows Script Host Language Reference section.
Cheers,
Andrew
>Hi all,
>
>Does anyone know how you can set the default printer for the system (not the
>set command, but the actual default windows printer).
>
>Im trying to do this because an external ocx is always using the default
>printer and i cant set it within vfp, and the users dont have access to the
>printers due to the NT security.
>
>Michael Henstock
>AWS
If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?
From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."
All my FoxTalk and other articles are available on my
web site.
Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.