Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime error can't find nianlys.dll after installing application

Hi Paul,

I created an installer off your Visual Studio setup project and ran that on Windows Vista and it worked fine. Now, I noticed in your setup files you were including the CVI Run-Time Engine merge module. Now, you are using CVI 8.0.1 which is not Vista compatible. CVI 8.1.1 was our first version that supported Vista. The installer I created on my machine picked up CVI RTE version 8.1.1 (i.e. since you typically only have 1 version of the CVI RTE installed) and thus worked on Vista.

Based on this test, I would like you to download CVI 8.1.1 RTE and then re-create your installer and then test that out on Vista. Verify on Windows Vista that version 8.1.1 of the CVI RTE was installed by checking the version in the system32 directory.

Let me know if this changes things

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 11 of 23
(3,143 Views)
I included the CVI RTE because the main project I'm working with needs it, and I was trying everything to make sure that it was the same. If I omit that inclusion I still get the same results.

On the machine you installed on did you have UAC turned on or off ?

On a hunch I've just tried installing from a command prompt running as administrator and everything is then fine, so I can only draw the conclusion that running as a user with least privelidge is what is causing the problems, this applies to both the vs installer and the wix installer.

Paul
0 Kudos
Message 12 of 23
(3,136 Views)
Hi Paul,

Still no luck on my end of replicating the behavior you are seeing.  The scenarios I tested were:

- UAC turned on; Logging in as an administrator; Installing and running as an admin. --> Worked fine
- UAC turned off; Logging in as an administrator; Installing and running as ad admin --> Worked fine
- UAC turned on; Logging in as an administrator; Installing the application as admin; Turned UAC off; Logged in as a user and ran the application --> Worked fine
- UAC turned on; Logging in as a user; Installing and running as a user --> Worked fine

To clarify, if you install and run the application as an administrator, everything works great? Do any of the scenarios I mentioned cause a problem on your end? If not, tell me the steps you are taking as I did above to help replicate the issue.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 13 of 23
(3,124 Views)
I am an admin on the machine, I just have to force elevation of the process by running cmd as administator (right clicking and choosing run as admin from the start menu) before executing the msi file from the command line.

Starting with a fresh image of vista default business edition install which has UAC Turned on
windowskey+R cmd  -> test.msi  == Failure
uninstall
Start->Right click Cmd and run as administrator ->test.msi == Success
uninstall
UAC turned off (Reboot)
double click msi in explorer == Success
uninstall
UAC Turned on (Reboot)
double click msi in explorer == Success


So something is being left behind to make it work correctly after a successful run.

Paul

 
0 Kudos
Message 14 of 23
(3,120 Views)
Hey Paul,

I tried all the scenarios that you mentioned in the post and we were unable to duplicate the errors. We wanted to clarify that when you say "Failure" you mean that the installer installed correctly, but you received the runtime analysis error? Is that a correct statement?

Additionally we wanted to know if the order that you posted your tests in was the same order that you actually tested? If that is true, could you run a successful case first, uninstall, and then try and run the unsuccessful case (by your comments on the post you may have already done this)?

Thanks and Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 15 of 23
(3,115 Views)
Yes I mean the installer ran to conclusion but I got runtime errors.

The order was how I ran them, and only realised after doing a successfull install that subsequent ones would work. So I redid the cases but reverted to a previous snapshot  in vmware before each test. I don't know whether it makes a difference but this test machine image is a member of a domain.

I will download a different VM image (microsoft have a 30 day trial image of vista) and see if it will work on that, but we've had this problem on at least 4 different client machines so far.

There is likely to be a follow up to this query too, I used to deploy an application using group policy, subsequently I have also discovered that after creating an MSI file I can't deploy it with Group Policy because of errors in the MSI after including the NI packages (this was with a Visual studio installer, and only happens after including the merge modules)

Paul
0 Kudos
Message 16 of 23
(3,108 Views)
I grabbed the vista image from http://www.microsoft.com/downloads/details.aspx?familyid=c2c27337-d4d1-4b9b-926d-86493c7da1aa&displaylang=en&tm and get exactly the same problem with this install too.
0 Kudos
Message 17 of 23
(3,091 Views)
Hi Paul,

Just wanted to let you know that we finally could reproduce the behavior you were seeing. We are not sure yet what the issue might be so we need to investigate it. As soon as we determine the issue, I will post and let you know.

Thanks for help!

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 18 of 23
(3,086 Views)

Hi Paul,

The issue is actually with how Windows Vista and the UAC works.  The issue revolves around the fact that when you log in as an administrator, you are actually running with standard user privileges.  This means that when you open the command prompt, you can only perform actions that are permitted by standard users (i.e. you cannot write to the registry for example). However, you can enter the "Admin Approval Mode" by right-clicking on the command prompt and selecting "Run as Administrator" to elevate yourself to have administrator privileges. This is all discussed in great detail in several Microsoft documents include here, here and here

This is important to us because the National Instruments shared directory path is stored in a registry key. So if you try and run the MSI from the command prompt, it will install the program you created but it will not create any registry entries. This is because you are considered a standard user. However, as you mentioned if you right-click the command prompt and run as an administrator, the registry entries are created and everything works. 

So the workarounds to this are either
1) Enter the "Admin Approval Mode" for the command prompt
2) Run the setup.exe associated with the MSI instead as it forces a prompt for elevation.

Hope this helps!

Best Regards,

Jonathan N.
National Instruments
0 Kudos
Message 19 of 23
(3,081 Views)
I believe that my only work around would be to just manually include the required dll's in the application directory.

This will hopefully negate the other problem I mentioned when deploying via active directory.
0 Kudos
Message 20 of 23
(3,075 Views)