Solved

Always "Run As" Administrator for .exe

Posted on 2009-06-27
8
1,482 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
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
 
LVL 4

Accepted Solution

by:
samierana earned 500 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
Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a trade show? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

911 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

20 Experts available now in Live!

Get 1:1 Help Now