Solved

Always "Run As" Administrator for .exe

Posted on 2009-06-27
8
1,488 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
Manage your data center from practically anywhere

The KN8164V features HD resolution of 1920 x 1200, FIPS 140-2 with level 1 security standards and virtual media transmissions at twice the speed. Built for reliability, the KN series provides local console and remote over IP access, ensuring 24/7 availability to all servers.

 
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
 
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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
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). …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

828 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