General information
Category:
Coding, syntax & commands
In looking around for Ed's code, I found this, which works nicely:
DECLARE INTEGER WNetAddConnection IN "mpr.dll" ;
STRING cRemoteName, ;
STRING cPassword, ;
STRING cLocalName
DECLARE INTEGER WNetCancelConnection IN "mpr.dll" ;
STRING cName, ;
INTEGER nForce
WNetAddConnection(lsPath,[],lsPort)
...and after digging around a bit more, I found the following gets my file to the printer:
COPY File TO LPT1:
...which I find only works on my 2k box...not the win98 boxes it has to run on.
BAH!
>Why not put the PIF and batch file in the network directory?
>
>>I need to do the equivalent of a NET USE command to capture output to a printer port to a network printer.
>>
>>I have been using Ed Rauh's APIRun class to issue a dos command to do this...which works fine on my 2000 box, but hangs on the win98 boxes, as the net command does not terminate...sits there in the 'Finished' state.
>>
>>I know I can do this by setting up a PIF file on each worstation for the net.exe command, but there are a LOT of workstations.
>>
>>Is there a cleaner way to capture the port? Barring that, is there a way I can make the dos windows exit witout going around to each machine and setting up that PIF?
>>
>>TIA
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only