Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows won't name printer with machine name on local ma
Message
From
09/03/2006 16:02:22
 
 
To
27/02/2006 02:56:32
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01099286
Message ID:
01102903
Views:
15
Thanks!
I knew there was a sys() function in there somewhere. I see now that it contains the machine name, plus some other stuff.

>
>If 'BUD3'$upper(Sys(0))
>  Set Printer To LPT1:
>Else
>  Set printer to name '\\BUD3\Zebra Stripe 600'
>Endif
>
>>I created code to get and set the windows default printer, as per code and other threads on here (UT).
>>(I need to do this because the driver for my Zebra S600 printer doesn't work right if the printer is not the default)
>>
>>Each workstation on my customer's network shares the label printer. I have hardcoded the share name: '\\BUD3\Zebra Stripe 600' as the printer to set default to when they want to print from my label printing application.
>>This works fine when the user is on a workstation on the network. But if the user is on the local machine.. the printer name is 'Zebra Stripe 600' (without the machine name).
>>
>>I tried to get windows to treat the printer as a network printer,even though it is on the local machine, but windows doesn't see to do want to do this. I tried adding the printer as a network printer, even though it was already installed as local, but windows (win2k pro) won't make a second instance of the printer.
>>
>>I ended up writing code in the app to check to see what user/workstation is in use, and if the local machine that the printer is on - then set the printer name without the machine name.
>>
>>Any suggestions appreciated.
Previous
Reply
Map
View

Click here to load this message in the networking platform