?
Solved

Always "Run As" Administrator for .exe

Posted on 2009-06-27
8
Medium Priority
?
1,501 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
[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
  • 3
  • 3
  • 2
8 Comments
 
LVL 23

Expert Comment

by:ComputerTechie
ID: 24729067
0
 
LVL 4

Expert Comment

by:samierana
ID: 24729070
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
ID: 24729075
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
7 Extremely Useful Linux Commands for Beginners

Just getting started with Linux? Here's a quick start guide that has 7 commands that we believe will come in handy.

 
LVL 4

Accepted Solution

by:
samierana earned 2000 total points
ID: 24730352
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
 
LVL 23

Expert Comment

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

CT
0
 
LVL 4

Expert Comment

by:samierana
ID: 24731004
ComputerTechie:
Please tell us the other way too.
0
 
LVL 23

Expert Comment

by:ComputerTechie
ID: 24731500
my thought was using powershell after reading this link.

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

CT
0
 

Author Closing Comment

by:SpinnerAdam
ID: 31597589
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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
A small collection of useful tips and tricks for Windows 10 users that I decided to write as a result of recent questions that were asked and answered at Experts Exchange. Two short video tutorials included. Enjoy..
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

762 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