Solved

Always "Run As" Administrator for .exe

Posted on 2009-06-27
8
1,470 Views
Last Modified: 2012-05-07
I have looked all over the internet for days and non of the solution have worked for me. I need to run a .exe file as an Administrator. Here is my setup:

I have server 2003 with active directory. The domain is JNR. I have an Administrator account and a regular user named jmain.

I want jmain to launch an .exe located in c:\Program Files\JNR\JNR.exe as if he was the Administrator. I only want this to occur with this particular .exe file. I know that I can click "Run As" everytime, but I don't want jamin to know the Administrator password. I just want him to simply click on the shortcut for JNR.exe and it launches in Administrator mode. The computer is Windows XP Professional.

If a script is needed, please write out the whole script for me :) Detailed step-by-step instructions would be greatly appreciated!

Thank you,
Adam :)
0
Comment
Question by:SpinnerAdam
  • 3
  • 3
  • 2
8 Comments
 
LVL 23

Expert Comment

by:ComputerTechie
Comment Utility
0
 
LVL 4

Expert Comment

by:samierana
Comment Utility
Try to use this program to create your EXE file with administrator password(definitely encrypted)
http://www.autoitscript.com/autoit3/downloads.shtml
 
0
 

Author Comment

by:SpinnerAdam
Comment Utility
I saw this and dowmloaded it but I have no idea how to use it. When I clicked on the file from the site it just launched cmd and quickly disappeared. Cam you write out instructions (using the information I gave to you above) on how I can use this?

Thanks,
Adam
0
 
LVL 4

Accepted Solution

by:
samierana earned 500 total points
Comment Utility
You have to use both programs:
1. Copy "CPAU.EXE" to your C:\windows\system32 folder.
2. Install Autoit and Open "SciTE Script Editor" from start menu.
3. In this Editor Just use following line:
Run("cpau.exe -u domain\username -p userpassword -ex notepad.exe -lwp")
4. Save this Script with some name (say myProg.au3)
REMEMBER: you have to comment all other line with ";"
5. If you will double click myProg.au3 it will open your NOTEPAD.EXE program. Open Windows Task Manager you will see that this program is running with new context (User will be the same as you mentioned above in command)
6. Now you have one Script which has your password open.... NOT GOOD... go to Start Menu and from Autoit Menu open "Compile Script to .exe"
7. Browse your myProg.au3 file in first box.
8. Browse path for your exe file (enter exe file name here assume myexeProg.exe)
9. Just say convert.
10. Double click myexeProg.exe file and it will open your NOTEPAD.EXE program. Check Task Manager for your which is different from logged in user and same user as in above command.
11. Copy this exe to your "User's Computer". No need to install any of above both programs.
Enjoy
(I have tested this on one of My XP Computer.
0
Don't lose your head updating email signatures!

Do your end users still have the wrong email signature? Do email signature updates bore you or fill you with a sense of dread? You can make this a whole lot easier on yourself by trusting an Exclaimer email signature management solution. Over 50 million users do...so should you!

 
LVL 23

Expert Comment

by:ComputerTechie
Comment Utility
Kewl, this was easier than what I was going to say next.

CT
0
 
LVL 4

Expert Comment

by:samierana
Comment Utility
ComputerTechie:
Please tell us the other way too.
0
 
LVL 23

Expert Comment

by:ComputerTechie
Comment Utility
my thought was using powershell after reading this link.

http://huddledmasses.org/a-guide-to-advanced-functions/

CT
0
 

Author Closing Comment

by:SpinnerAdam
Comment Utility
Very good, thank you! I also have another question here, if you want to take a look and get some points :)

http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/XP/Q_24528008.html
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Several part series to implement Internet Explorer 11 Enterprise Mode
Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now