Solved

Running an executible with different credentials.

Posted on 2012-03-26
4
245 Views
Last Modified: 2012-05-08
I have an Windows Application that requires to be executed as an Administrator. I have a user that does not have admin rights to run this program. I am wanting to write either a Window Forms application, or Windows Console application that would kick off the program and pass it the administrative credentials that I would hard code into the software that would get in turn compiled so that the user will never know the admin username and password. If someone could give me some links or examples of how i can make this happen, i would appreciate it very much. I prefer vb over c#.
0
Comment
Question by:klt13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 28

Expert Comment

by:Ryan McCauley
ID: 37771573
If you were to do this in .NET (VB or C#), the code could be de-compiled to show the password that you used, exposing your credentials if you hard-code them into your source. While this takes a little bit of know-how, it's not too hard with some free or trial applications on the market.

I've seen another program that does this, though I've never used it:

http://www.robotronic.de/runasspcEn.html

This should to the trick - it takes your credentials and compiles a wrapper for the application so it will launch as the account you want without the end user seeing the credentials. It appears to be free for personal use or about 4 Euros (they're in Germany) per computer you need to run it on if you're using it for a business.
0
 
LVL 32

Expert Comment

by:bhess1
ID: 37774256
There is another way to implement this - change the permissions on the application folders to grant the necessary permissions to the user.  See the discussion here:

How 2 have a permanent RUN AS ADMIN for one specific program ?

Also, what is the Operating System the user is running.  If it is Windows 7, you can set a specific shortcut to always run as administrator by right-clicking it and selecting the option.
0
 
LVL 1

Accepted Solution

by:
klt13 earned 0 total points
ID: 37927399
Thanks for all of you that commented on this question. About a day after I posted it, my priorities got shifted. So, when i get a chance, i'll try each of your comments.
0
 
LVL 1

Author Closing Comment

by:klt13
ID: 37940772
not a priority at the moment
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

710 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