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.
Solved! Go to Solution.
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?
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
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:
I know it should be something easy that I am missing again but I am stumped.....
fix the command line with: cmd /r "Elevated Command Prompt.lnk"
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
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 "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.