LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Spectre_Dave

Set vi to run as admin

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

I have had to jump through hoops to create a .net process or use runas to get portions of code to run

when the end used does NOT have admin privileges.

 

Add Option under VI Properties >> Execution to allow setting the VI to run as admin or another user.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
8 Comments
JackDunaway
Trusted Enthusiast
Spectre_Dave
Active Participant

Yes, it could be a security problem.

 

This attribute should only be visible if logged in with Admin rights.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
Spectre_Dave
Active Participant

This is a MAJOR problem in LabVIEW.  Our products are Ethernet based  - which require the use of Sockets - which requires ADMIN rights. We do not give the test people Admin rights  for security reasons. Therefore I have to create a process that does have ADMIN rights so we can test our products.

 

I am suggesting a special class of VIs that inherit Admin rights for these special situations.  I realize this can open security holes but so does the the method that I am currently using and other work arounds that I have seen posted. This is already allowed in .net and I use .net constructors in LabVIEW to create an Admin process. I am simply asking for an easier way to run Admin processes.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
Intaris
Proven Zealot

And creating a seperate EXE which runs with admin rights isn't viable?

 

Otherwise you just run the entire EXE with admin rights by setting up the "Run As" options.....  I don't see how or why this should be a VI option.

Intaris
Proven Zealot

Don't you see the problem (aside from the fact that I think what you want to do might not be possible) with overriding system security systems?

 

Normally, the resitrictions placed on user accounts are there for a reason.  How do the mentioned .NET systems deal with this?

AristosQueue (NI)
NI Employee (retired)

Question: Can you change the permissions of an EXE that is already running? I thought an EXE was either launched with higher permissions or not and it held that level of access throughout its run. I've never really delved into this, but I didn't think an EXE could be elevated, even if the user was prompted for a username/password. Am I wrong? Are there differences between OSes on this question?

Intaris
Proven Zealot

@AQ

 

This is why the example shown and my tips until now were limited to actually launching a seperate EXE with different rights.

 

I'm not sure it's possible to have part of an EXE with elevated rights and the rest with restricted rights.

Intaris
Proven Zealot

Problem is that the VI is in itself not a seperate process to the rest of the program.  The entire program would probably have to be run with admin rights to enable this kind of thing.  The only other option is really to launch an application (You can create an EMPTY application and load the VI in parallel via command-line) which could then be run with admin rights.