04-08-2019 08:14 AM
I am trying to run system exec as admin using a batch file but always get an error saying the command isn't right.
04-08-2019 08:52 AM
What does "/r" mean? I don't see that in the list of options when I run "cmd /?" from the command prompt.
04-08-2019 09:25 AM
I found it there https://forums.ni.com/t5/LabVIEW/Run-command-prompt-as-administrator-using-system-exec-vi/m-p/290635... so I tried because /c didn't worked
04-08-2019 09:26 AM
It looks like you don't have a space between cmd and /r. You also need to create a shortcut to the command prompt that requires admin rights. See also https://forums.ni.com/t5/LabVIEW/Run-command-prompt-as-administrator-using-system-exec-vi/m-p/290635....
04-08-2019 09:57 AM
I'm still getting the same error
04-09-2019 12:38 AM
@nandiouioui wrote:
I'm still getting the same error
The error say's you are still not having a space between cmd and /r.
04-09-2019 01:18 AM
I tried with and without and it doesn't change anything
04-09-2019 01:24 AM
I found the error it was because my path file was wrong https://forums.ni.com/t5/LabVIEW/What-is-Error-Code-267/td-p/23804
04-09-2019 01:29 AM - edited 04-09-2019 01:31 AM
@RavensFan wrote:
What does "/r" mean? I don't see that in the list of options when I run "cmd /?" from the command prompt.
/R is the same as /C
C:\> cmd /? Starts a new instance of the Windows command interpreter CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string] [ ... (Output shortened) ... ] /V:OFF Disable delayed environment expansion. Note that multiple commands separated by the command separator '&&' are accepted for string if surrounded by quotes. Also, for compatibility reasons, /X is the same as /E:ON, /Y is the same as /E:OFF and /R is the same as /C. Any other switches are ignored.
04-09-2019 08:15 AM
@UliB wrote:
@RavensFan wrote:
What does "/r" mean? I don't see that in the list of options when I run "cmd /?" from the command prompt.
/R is the same as /C
C:\> cmd /? Starts a new instance of the Windows command interpreter CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string] [ ... (Output shortened) ... ] /V:OFF Disable delayed environment expansion. Note that multiple commands separated by the command separator '&&' are accepted for string if surrounded by quotes. Also, for compatibility reasons, /X is the same as /E:ON, /Y is the same as /E:OFF and /R is the same as /C. Any other switches are ignored.
Thanks. I was only looking at the list and never saw it. I never looked through the pages of other comments in all those paragraphs.