07-01-2014 08:50 AM
I have an application that will not stay open unless it is run through command prompt as an administrator. I have found a way to add a shortcut to my desktop in order to open it (Administrator: Elevated Command Prompt) but not sure how to programically open this program. Does anyone have a quick and easy solution to this? I would like to open the Administrator: Elevated Command Prompt and then start writing my commands.
Thanks!!
Solved! Go to Solution.
07-01-2014 09:56 AM - edited 07-01-2014 09:57 AM
Hi ncm
See tha image, in the shortcut go to Properties/advanced in select the Run as Administrator option.
I hope it helps you
07-01-2014 10:44 AM
So the name of my shortcut is Elevated Command Prompt so I did the following with no luch even opening up the file... any suggestions?
07-01-2014 10:50 AM
You need the extension of the shortcut "Elevated Command Prompt.XX" and also be sure of the path, go to properties/general in the shortcut
07-01-2014 11:07 AM
Here are my properties, I changed my program to this and the command prompt closes immediatly and doesn't open desktop shortcut (which is technically a command prompt shortcut with administrator rights that I made, I followed:
http://www.sevenforums.com/tutorials/3718-elevated-command-prompt-shortcut.html)
I know it should be something easy that I am missing again but I am stumped.....
07-01-2014 11:10 AM
fix the command line with: cmd /r "Elevated Command Prompt.lnk"
07-01-2014 11:12 AM
You have saved the day!!
Thank you very much, I knew it should be simple but just couldn't see the forest cause of the trees
07-01-2014 11:16 AM
Awesome, good luck with your project
07-01-2014 12:11 PM
That worked exactly how I asked but am finding out that is not what I need. It opens the program but I want to programmically run commands on the Elevated Command Prompt. Any ideas on how to do this? I am trying to do this all programmically so that the user only has to run LabVIEW and not actually type anything into the command prompt. An example of commands that I want to run in the Elevated Command Prompt are:
cd /
cd "Program Files (x86)"
and other commands. The reason that I can't use a regular command prompt is that the program will only run out of one with Administrative rights, and that is why I am trying to use the Elevated shortcut because it has administrative priveledges saved in the shortcut.
Any suggestions?
07-01-2014 12:33 PM
Batch file.