Bobby Posted October 27, 2009 Share Posted October 27, 2009 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 Link to comment Share on other sites More sharing options...
Bobby Posted October 29, 2009 Author Share Posted October 29, 2009 bump Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now