Jump to content
  • Advertisement
Sign in to follow this  
Mike_Donner

[.net] Edit remote files as non-admin

This topic is 4135 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an application on several dozen computers that utilizes an ini file located in the C:\WINDOWS directory of the computer. The problem is that one line in the file should have a drive letter of 'U' instead of 'C'. I have been asked to develop an application which would be called from a VB Script (used to map drives for user depending on his Active Directory group(s)) that would (in theory) look on the local computer to see if the ini file is there and edit the file making the neccessary drive letter change. I wrote an application (in C#) that I can run on my desktop and does what it is suppose to do, however if I log in as a user without admin privileges it errors out. Also if I try to run the application from the fileserver it looks at its directory structure instead of the remote computer. So I have a couple of issues I need to find solutions: 1. Run the application as a non-admin user but provide credentials inside the application that will allow the file to be modified. 2. Be able to call the application from a central location via the VB Script but still be able to look on the local computer for the ini file to edit. The main thing we don't want to write a batch file that would do this but would also require us to leave a privileged account and password in the clear in the file. Any ideas, suggestions, or help would be greatfully accepted. Mike [Edited by - Mike_Donner on June 22, 2007 3:17:30 PM]

Share this post


Link to post
Share on other sites
Advertisement
Why not just use Task Scheduler to run your existing app as Admin? You can specify a username and password to run as, and Windows worries about protecting credentials for you.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!