LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LabWindows app distribution without admin rights

Solved!
Go to solution

Hello,

 

I'm currently reaching the end of the development process of an internal tool for my company.

Now, I'm working on the distribution kit to allow my colleagues to use it easily.

 

I've tried LabWindows installer to create a deployment kit. The problem is, it generates an executable including both my files and the runtime.

At the installation, it naturally requires the admin rights to install both, and no one as them, according to our IT policy.

 

I would like to find a way to bypass this need of privileges, as my tool is very lightweight and only uses RS232 library.

Is there a way to copy only the necessary dlls from LabWindows and link them to my executable in order to keep the software installable without admin rights ?

 

Thanks in advance,

Théo

 

_________

using LabWindows v20.0.0

0 Kudos
Message 1 of 12
(1,487 Views)

Hi,

 

You can make your own installer using a program or bat file:

 

You need to have privilge to make a local directory.

 

Copy the following files to your local directory:

- MyProg.exe

- cvirte.dll

- mesa.dll

- the cvirte folder (cvirte\bin\* and cvirte\fonts\*)

- Shortcut from desktop or start menu if needed.

 

Jan

 

Message 2 of 12
(1,441 Views)

Hi Jan !

 

Thanks a lot for your response. It seems that something is still missing: I still have a dependency error.

Maybe it is because I'm using the RS232 and XML libraries. Do you know which elements are needed for this usages ?

 

Thank you for your help,

 

Théo

0 Kudos
Message 3 of 12
(1,427 Views)

Hi

 

Many, if not all of the RS232 functions is defined the cvirte.dll. I do not know where the XML functions is defined.

 

There is a couple of useful tools you can use to get the information.

 

- Dependency Walker (Locate libraries used by the executable)

- Dumpbin.exe (Locate functions within a dll)

 

Jan

 

 

Message 4 of 12
(1,422 Views)

Hello again,

 

I've solved the problem of XML functions, but the error is still occurring.

 

I do have checked with Dependency Walker, and it indicates me that the cvirte.dll file is missing, whereas the dll is present in the executable folder (cf. screenshot). 

Before placing the dll file in this folder, I had an error mentioning cvirte.dll, but now I only get "0xc000007b" error code, which would lead me to think that the problem is somewhere else.

 

Do you have any other idea about it?

 

In all cases, thanks for your time,

Théo

0 Kudos
Message 5 of 12
(1,417 Views)

Little clarification: my LabWindows app uses also a graphical interface (.iur), I don't know if it changes anything...

0 Kudos
Message 6 of 12
(1,411 Views)

I frankly discourage you for going this way! AS you are discovering, finding all the libraries needed to run a CVI app can be hard and is not guaranteed to work on every target machine.

What I normally do on minimal applications of mine that use the base functions like graphical user interface, file I/O, RS232 of ethernet access to external devices, some analisys functions and so on is to install the CVI Run-time Engine using the specific installer downloadable from NI site and distribute my application as a set fo files to simply copy on the target PC.

This works if your program makes no use of specific separate tools like DAQmx, vision, SQL or so.

 

Your IT stuff forbids you to install software on PCs? Just send the RTE installer to them and let them perform their work installing this standard piece of software which requires no special instructions or advices 😉



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 7 of 12
(1,403 Views)

cvirte.dll is simply the CVI Runtime Engine. It is compiled with Visual C and as such has a dependency on the Microsoft C Runtime Library for the version that NI used to compile CVI with (which of course changes with the CVI version too as NI has to update the used Visual C toolchain as well when Microsoft decides to EOL a version or they used a new feature that is hard to implement in the older version.

 

So you have to at least make sure that the according MSVCRTxx.DLL and its support files are also present on any target system. Then there are other dependencies as NI has stopped making the CVIRTE DLL a monolithic "contains everything from coffee maker to rocket engine" monster long ago and compartmentalize it into multiple subcomponents. And this low level design changed multiple times over the course of time. With LabWindows/CVI development having pretty much stopped, you could argue that now is the time to research that whole system to find out how everything is dependent on each other since it won't change again in the future, but honestly: What for?

 

The CVI RTE Installer knows about all these details for the version it is supposed to install. Trying to find all those dependencies yourself is a work in vain. As Roberto said, if your IT department doesn't let you install applications in the way they are meant to be installed, then let them deal with the workload. Provide them with the Installer for your application and tell them on which machines you need that installed. If they can setup rules they also have to take responsibility for the consequences, otherwise they are not in the right location and need to be replaced.

Rolf Kalbermatter
My Blog
Message 8 of 12
(1,395 Views)
Solution
Accepted by tprigent

Thank you all for your answer,

 

I understand that what I'm looking for is not the best way to do. The problem is, if I condition the access to my software to an IT request, nobody will use it, as the process is so heavy.

 

For those that would be interested, I found a solution:

  1. Take a blank computer, without any NI stuff (VM with admin rights for exemple)
  2. Copy the following files to your local directory (thanks Jan):

    - MyProg.exe

    - cvirte.dll

    - mesa.dll

    - the cvirte folder (cvirte\bin\* and cvirte\fonts\*)

  3. Create a distribution kit with all the modules needed
  4. Create a backup of "C:\Windows\SysWOW64", where the LabWindows runtime will be installed
  5. Install your app with the distribution kit
  6. Use WinDiff to find all files added by the distribution kit
  7. Copy them at the root of your local directory

Now, your app should be purely portable !

 

I hope this little guide will help others 😉

 

Thanks again for all the help provided by the community, you put me on the right path...

 

Théo

0 Kudos
Message 9 of 12
(1,380 Views)

Ok you are the master in your app, but.... if your IT has blocked software installation, manipulation of Windows directory is very likely to be protected as well!



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 10 of 12
(1,372 Views)