Link to home
Start Free TrialLog in
Avatar of Balco
Balco

asked on

Use a batch file to transfer and print a file on a print server

Hi,

I am trying to get the attached batch file to send and print a file to our print server.

The batch file works on our old print server which is a windows 2003 server and a domian controller.

When I go to run it on our new print server which is Windows Server 2008 R2 and also our Active directorey server I get Access is denied as per attached jpeg. If I run the job as a Domain Admin it works fine. I have given a test account full print, manage printer and manage documents and still no luck.

i have also disabled the firewall on the print server and terminal server and still get the same access denied message.

I know it is a permissions issue but am not sure where to go and look now.

Thanks Mark
Access-Denied.JPG
PRN-batch.txt
Avatar of Nagendra Pratap Singh
Nagendra Pratap Singh
Flag of Australia image

Is it a scheduled task?

You can make it a scheduled task and feed domain creds.

You can run that command manually.
Avatar of nettek0300
nettek0300

My guess is that the test account does not have access to read the file from the Windows 2008 R2 server.  I would verify the permissions on the temp directory to make sure the test account has access to the file.  Are you able to sign on to the server using the test account and read the file?
Avatar of Balco

ASKER

Hi,

This is not a scheduled task.

Yes the test account can access the file on the terminal server as it can copy it to another folder. What it cant do is copy the file to the print server queue.

Cheers
Make it  a scheduled task with no further occurrences.

Ask the normal user to execute this task to copy / print the files.
Avatar of Balco

ASKER

All I wont the user to do is click on a file when they receive it and it prints. the print files have a .pclz extension which I have setup to be associate with the batch file when clicked on.

The print file is never the same, so I dont see how a scheduled task can work.
ASKER CERTIFIED SOLUTION
Avatar of eerwalters
eerwalters
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Balco

ASKER

Hi,

Thanks for the solution, it was very easy to follow.

Cheers Mark