Jump to content
Sign in to follow this  
Bobby

Running Sage as an Administrator!!!

Recommended Posts

Bobby

Hi guys,

I'm trying to run Sage as an adminstrator while logged on as a user. Let's call her Judy. "Simple enough" I hear you say, "create a local administrator account and use this code..."

RunAs("sageadmin", @ComputerName, "<password>", 0, "C:\PROGRA~1\COMMON~1\SAGESB~1\SBDDES~1.EXE")

Which I did, and it did the trick, but now she can't print because there are no printers installed for sageadmin and she can't save files to a network drive because sageadmin does not have permissions.

There is no way (correct me if I'm wrong) to give a local user permissions to domain resource. Any attempt to add them to a group in ADUC draws a blank, so I created a domain account in ADUC called sageadmin and added it to the Administrators group on the local machine. I then logged onto that machine as that user and added a printer, then logged on as judy and ran the script again (substituting @ComputerName for the domain name of course).

Again it ran, and again there were no printers.

I changed the code so it was like this...

RunAs("sageadmin", "<domain>", "<password>", 1, "C:\PROGRA~1\COMMON~1\SAGESB~1\SBDDES~1.EXE")

This should load the NTUSER.DAT file for sageadmin from the local machine right?

Bingo! My printer is listed, but now I have exactly the same restrictions I had when I opened the program as Judy.

This is beginning to drive me mental. If anyone has any suggestions (apart from "shut up and deal with it" :)) I would be extremely grateful

Thanks,

Bobby

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.