>>>Our NET USE command does not work because we have a space in the printer name.
>>>
>>>What is the appropriate syntax to use to have this working:
>>>
>>>NET USE \\PROLIANT\HP DeskJet 895C Series Printer
>>
>>When you share a printer, it tells you that it won't be accessible to DOS programms if the share name is longer than 8 characters or includes spaces in the name.
>>
>>The only way is to have it either mapped to an LPT port or use a DOS accessible name. i.e.: HPDJ895C
>
>We found that the shared name is a short name. However, one printer that need to be shared in on a computer name which is a long name. So, we have the same problem. What should I do exactly to map to an LPT port?
If quote encapsulation isn't working as I suggested, the shared printer name resolves the same way as an LFN; you can use the API call GetShortPathName once to find the valid short name and use it. Quote encapsulation works for me, though.