Solved

Running an executible with different credentials.

Posted on 2012-03-26
4
244 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

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…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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