Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using 'NET USE' command to redirect LPT1 output
Message
De
13/01/2001 20:53:13
 
 
À
13/01/2001 20:34:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00462995
Message ID:
00463469
Vues:
13
>Hi John,
>
>Can't assume my customers will have WSH. Actually, this is a case where VB seems to be the right tool. I'm planning a VB applet that investigates all defined printers as well as the default one and if any are assigned to LPT1 and allows my clients to redirect LPT1 to the printer of their choice, but I need to know the ins and outs of the "NET USE" command. What do you think?
>

You ought to at least use the Win32API - you can attach a printer using WNetAddConnection()

>Alex
>
>
>>I think this can be done with the Printers object in the Windows Scripting Host. I think you can connect that way and then set it as your default printer. Hopefully Mr. Tasker will chime in and provide more detail :-)
>>
>>>Does anybody have detailed information on the NET USE command. I need it to redirect printer output from LPT1: to a printer in the network in Win2000.
>>>
>>>TIA,
>>>
>>>Alex
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform