LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Run Time from a USB stick

Hello,

I'm working on a simple VI using the SMTP send file function, which will be run from a USB stick. The executable works well save for that it needs to run from the stick on computers without Run Time installed. I have Run Time 8.5 installed on the stick, in the X:\Program Files\National Instruments\ folder, but the application can't find the RTE to execute. It needs to find it automatically, since several people (all untrained in LabView) will be inserting the stick into various remote Windows computers in order to send the emails and attachments. Another potential problem is the varying drive letter assignment given to the USB stick, but that doesn't seem to be the current problem. Any suggestions?

 

Setup:

WinXP 

LV 8.5 

 

Thanks,

Mark 

0 Kudos
Message 1 of 9
(4,462 Views)

I don't think you are going to be able to do it.  Obviously you need the Runtime installed to run the LV executable.  When you install the runtime, it will put all kinds of hooks into the operating system and copying over .dll's to the appropriate Windows and System directories.  There is no way to have all of those files sitting on a USB stick and expect Windows to know how to find them and what to do with them unless you run the installer for the runtime engine.

 

Now you might be able to create some code that detects whether the run time is installed, and if it isn't, have it install the Runtime engine whose setup files are located on the USB stick.

Message 2 of 9
(4,448 Views)

In some cases it possible, if you not using packages which should be installed, like IMAQ, VISA, etc...

But do not install RunTime on the memory stick (because some paths will be stored in the registry - you may get troubles with your PC when stick will be removed).

Try to do following (without guarantees, but may work):

1. Copy <Program Files>\National Instruments\Shared\LabVIEW Run-Time\x.x directory to your USB stick (x.x - LabVIEW version which was used for your project)

2. Place your builded application into this directory on USB stick (executable should be located at the same place where lvrt.dll located)

3. Try to start it on the PC without RunTime.

 

hopefully it helps,

Andrey.

 

Message 3 of 9
(4,431 Views)
I don't know if Andrey's suggestion will work with 8.x, but I posted a set of similar steps for LabVIEW 7.0 here, which might also help with 8.x.

___________________
Try to take over the world!
Message 4 of 9
(4,425 Views)

Thanks for the ideas everyone, I'll try the copying trick this afternoon.

 

Anybody care to speculate on why the RTE is required for all LV applications? I'm being a bit selfish here, but it seems like some programs should be simple enough to compile with everything they need to operate.

0 Kudos
Message 5 of 9
(4,387 Views)

Anybody care to speculate on why the RTE is required for all LV applications? I'm being a bit selfish here, but it seems like some programs should be simple enough to compile with everything they need to operate.

For the same reason that you need the Matlab Run-Time engine for Matlab DLLs and the .NET distribution for any code that is written in .NET and the Java Run-Time for any Java code, and the Visual Basic Run-Time for older VB code. Code that you write in C to run under Windows also uses libraries that you need to have installed on a computer. It's just that this stuff is already installed with Windows. 

Message 6 of 9
(4,382 Views)

Thanks for the quick responses everyone. Audrey's suggestion worked for me on 8.5. Autorun isn't strictly necessary for this project, in fact it seems to cause problems with security on several computers. I should be able to just make a shortcut to the application on the root directory for users to find instead.

 

Thanks again

Mark 

0 Kudos
Message 7 of 9
(4,360 Views)

Congratulations, Mark!

 

Now you can delete some files from usb stick step by step and every time check that your application still OK. I guess you can reduce size of the LabVIEW Run-Time from original 80MB to 15-20 MB by deleting unused language resources, plugins, etc. 😉

 

best regards, 

Andrey.

Message 8 of 9
(4,351 Views)

Andrey,

 

There probably is fat to trim out, but that's not a front-burner task for now. The lazy part of me says with 2 gig sticks so cheap trimming tens of megabytes isn't worth a lot of effort. The lean and efficient part (which rationalized that removing passenger pegs will make a motorcycle faster) feels that every spare line of text is dead weight. We shall see how it goes.

 

Later

mark 

0 Kudos
Message 9 of 9
(4,341 Views)