Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing problem when using runas

Status
Not open for further replies.

hydruid

Programmer
Feb 5, 2008
103
US
Here is what I'm dealing with:



Tom has printer-A installed on his local machine. Tom terminal services into a core style 2003 server. There is a logon script that adds a networked printer-B. All is well and Tom can print to both printers.

Tom then executes a batch file that does a runas administrator for Program-A. Everything inside program-A works except when he goes to print, he only sees "Printer-A from session1" but can't print to it.

(also, tom logs into the local pc as labuser, and then logs
in as Tom to the ts)

The program has to be ran by the domain administrator account, no way around that, it's designed to be like that (silly i know)

any ideas?
 
Are you saying that when using this batch file "Tom" is unable to print to the printer attached to his local machine?

What if the local printer was Shared too and Permissions for access given to the Runas username? If not (Shared) does the Runas user have enough Access Permissions for the local printer?

Have you seen this program that can be used with Batch files as well as .exe in XP?

Runasuser
 
The runas username is administrator of the domain. That account has been given full access to both the local and network printer.

The problem with the program is that it can only be ran by 1 user. If two people log into the ts server, as 2 different users, it works for the 1st person but then not the 2nd. Then if both of those users log out and then a third user logs in with a different name, it won't work for that person either. It will only work as the 1st username that ran it. It's stupid and I hate it. It created a temp file the 1st time its ran and if you delete the temp file, you have to reinstall.

Thats why I came up with the runas domain\administrator option.
 
I notice you are "tagged" as a "programmer", is this a program you created yourself, or a commercial program that might have a "Help and Support" section, or an alternative program there, or elsewhere, that might do the job?

Can you Print to a File, and sort everything out by printing the file later as "Tom" or whoever to wherever?
 
I did not program it, it would work correctly if I had.

No luck with their tech support, they say it doesn't work at all over ts.

I tried to print to a file, but it put it out as a .rtm and so far I haven't found any converters or a program to open it (in noteword/wordpad it's all special charachters)

The problem in changing applications is that it is part of their accounting system.

The last solution I have is to run it on the local machine and not use it over ts. Another solution I thought of is changing her login script to map it's shares using administrator initially for testing and then using a power user to limit privileges.
 
The output from Print To File (I thought the output file had the extension of .prn?) has to be copied to the actual printer itself and not read in Notepad or other applications.

It contains all the information and coded instructions for the printer to interpret and print the file.

I think you just copy and paste the file onto the printer icon or copy it in a command prompt to lpt1.
 
It has a .rtm extension, but I will try just dropping it on the printer to print, hopefully it will print out correctly!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top