Printing using the Runas command in windows 2000

Posted on 2006-04-05
Last Modified: 2012-06-22
I have an Application, which i need to run using a user different of the current user, i have tool that use run as.

The application works fine, and access the database and network resources without a problem.

But when i try to print i don't have access to the printers, i get an error saying that there is no default printer.

I already logon with that user and configured the printers, but still doesn't work.

Is there a way to solve this?
Question by:wguerram
    LVL 22

    Accepted Solution

    have you tried using the "profile" switch with the runas command?


    runas /profile /env /user:<domain>\<username> "path\subdirectory\executable.exe"

    Hope this helps!


    LVL 8

    Author Comment

    Hi Bartender, thanks for the answer, but i hace another problem also. this is what happes.

    I have a domain user with administrative privileges, my application runas the administrator, although i am login with a specific user the application always run with the administrator user.

    Only this user has access to the network resources, no other users have it.

     My Application export data to excel and opens excel automatically using automation, my problem is that excel runs also under the adminitrative account, i want to run excel under the current user not the impersonated user.

    The problem still now is that the apis i have found requires the user password, i only know the user. is there some api or command that runs an application without specifying the password.
    LVL 22

    Expert Comment

    unfortunately, I don't know of anything that will run as a user without having to input their password.
    I'll keep looking, and hope that either I find something useful, or someone ewlse has the answer for you.



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
    In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now