>>>I have a job that runs at night on a machine that has no users logged on. I am trying to programatically log on to the network.
>>>
>>>I am using NT 4.0
>>>
>>>Does anyone know if you can do this in a batch file or any other way?
>>>
>>>Thanks,
>>>
>>>James
>>
>>I start application on a NT 4 server using WinAt without any user logged in.
>>
>>WinAt call a batch file in which I use «net use z: \\servername\sharename» to map a drive from another server and then I launch my application.
>>
>>It works very well.
>
>
>I do the same thing with mapping to the network drive. It works well for me too. The problem I'm having is accessing the network printer while not being logged in.
You have to be logged in, but you can use the same API call that maps drives to map printers, at which point, you've got a session to the server, and you cn access the printer by name or UNC as well as the mapped print device name.
>