LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
altenbach

A special application instance for potentially unsafe VIs.

Status: New

For people like me that open a lot of odd VIs from the forum, the example finder, and other places (maybe that's not the norm!), there is always the possibility of collision with my own projects.

 

If I already have a project open, downloaded VIs automatically open in the existing project application instance. If they crash or otherwise lock things up, my entire project is toast (fortunately we have auto-recovery :)!)

 

Windows already has a mechanism to distinguish potentially unsafe downloaded content (I actually don't know how that is implemented), and I would like to extend this to LabVIEW related files.

 

Proposal:

 

  1. If I have a regular project already open and click on a VI in the browser, it should open in a special application instance designed for that purpose.
  2. The application instance should act like a sandbox.
  3. Multiple downloads should all open in that same instance simply to isolate them from the current work environment.
  4. This application instance should be more restricted in the way VIs execute, for example "run when opened" should be disabled no matter how the VI settings are. Maybe the toolbar should always be visible, etc.

 

6 Comments
tst
Knight of NI Knight of NI
Knight of NI

I don't think there's any way to recognize the file was opened from a browser directly (I'm assuming that on Windows the info is passed using DDE, but I don't think you can recognize who issued the request), but this can probably be applied to any VI which was opened from the temp folder.

 

This would also apply to files opened from programs like LVDiff, but I don't think that's a real problem.


___________________
Try to take over the world!
altenbach
Knight of NI

I was thinking about the block/unblock file option on newer windows OSs. Maybe LabVIEW can tap into that?

 

 

 

 

jwash
Member

You can get some of what you want by creating a new empty project before you double click 'potentially unsafe' VIs.

 

If the hierarchy of a vi you double click conflicts with the hierarchy of any of the vis in your current project, you will be asked if you'd like to open the double-clicked vi in a new project.  You should have no fear of cross linking your existing vis with the double-clicked vis.

 

If you crash LabVIEW (I certainly hope you don't and can't but we do live in the real world...), having the 'potentially unsafe' vis in a different application instance from your current project doesn't help you much since when LabVIEW crashes all projects disappear anyway.

 

The idea of not running auto-run vis and such is an interesting one.  It reminds me of how Excel always makes me jump thorugh hoops to allow scripts on my worksheets to run.  As a user at home, I despise that feature, however, I cannot bring myself to turn off the 'hoops' option because I never know what my kids are going to download.

 

It would seem like that disabling auto-run might be an interesting project-wide setting.  At some point you want to reenable auto-run.  You also may need to communicate to the user that it is off (or on).  Options like this always open a can of worms of some size.

 

GriffinRU
Member

If there is unknown VI and you would like to pick-inside without running (even if set to run when open) just drop it into empty block diagram and you are good to go...

 

-Artur

altenbach
Knight of NI

> If there is unknown VI and you would like to pick-inside without running (even if set to run when open) just drop it into empty block diagram and you are good to go..

 

So? (Another possibility would be to import the VI into a project and open it from there). Both ways are not really a viable alternative when opening a VI from the browser. The point of the idea is to avoid these circuitous alternatives that are not well known, especially to beginners who would benefit most from this idea.

 

Just because there are obscure ways around it, does not mean the problem is already solved.

RavensFan
Knight of NI

Perhaps there should be a LabVIEW environment setting that overrides the Run when Opened setting.  I would set that on my PC since I am far more likely to open a VI off the forums (dozens of times per day) than to open my own VI that I would actually want to run when open (probably just a couple times in the 14 years I've been using LabVIEW).

 

If you do have that override turned on, and you try to open a VI set to run when open, LabVIEW could pop up a dialog box saying that the VI was set that way, then perhaps give you the option to open without running, or proceed to open with running.