Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

"xcopy" install on win 7 x64 and x86

We are not happy that the default setup of MS requires user to run the setup As Administrator - something they do not

have to do with our non-NI-equipped applications.

 

When I setout to rememdy this by xcopy deploying the NI libraries (using the tips in "Deploying Measurement Studio Windows Applications," I was able to create a working package for XP Vista and for Win 7 x86 installations, but it did not work on win 7 x64 PCs.

 

Our application is targetted for solely for X86; we're using vanilla VisualStudio setup/deployment for the installer.

 

The symptom was failure to initialize/load nianlys.dll  -- 

 

Remember it worked on Win7 x86 and vista.

0 Kudos
Message 1 of 7
(6,086 Views)

Ralph,

 

I apologize for the inconvenience that the problem with Measurement Studio Deployments administrator escalation has caused. However, have you seen the workaround I provided in another thread here. I have copied the important instructions below:

 

You can edit the .vdproj file that is built with the installer. Search for the line "RequiresElevation" = "11:FALSE" and change the value to "11:TRUE". This will make the installer ask for administrative priviledges to run. You can read more about this under the Application Elevation topic here.

 

Also, the KnowledgeBase article Receiving "Unable to Load DLL 'nianlys.dll'" Error When Running A Measurement Studio Application on ... might provide a bit more insight into these sort of problems.

 

However, you may notice in the XCOPY documentation you referenced, there is a section about 32-bit vs 64-bit versions of DLLs. Copied below is the portion that probably describes the behavior you are experiencing.

 

.NET applications created on a 32-bit operating system using Measurement Studio libraries that depend on unmanaged parts do not support XCOPY deployment of 64-bit .NET applications because the 64-bit versions of unmanaged DLLs are not installed to a 32-bit operating system. You must create 64-bit applications using a 64-bit operations system for 64-bit Measurement Studio XCOPY deployment to be supported.

I would recommend trying the approach used in my workaround posted on the forum to include the adminstrator escalation into the installer rather than use XCOPY.

National Instruments
0 Kudos
Message 2 of 7
(6,075 Views)

ok, but the issue on win 64 is not quite what you describe.

In our case we're deploying a purely 32-bit application with all 32-bit NI libs.

 

Why would that not run under win32/x64 ??

 

Are the libraries themselves deciding what kind of app they are from the underlying OS arch?

That doesn't seem right.  If they're called from a 32-bit app, shouldn't 32-bit libs run fine even

on win7/x64. 

 

Otherwise the setup project is faced w/ determining the underlying arch and installing one set

of dlls or another --I know of no cabpability to do that in a VisualStudio deployment project.

Distributing two separate setup/installers is just plain nuts.

 

 

0 Kudos
Message 3 of 7
(6,060 Views)

Hi ralph_L,

 

I was wondering if you are setting the active solution platform in the configuration manager to Any CPU or x86.  If it is set to Any CPU, then the application will run as 64 bit on a 64 bit OS and thus fail to load the correct 32-but analysis library.  However, if you set the target to x86, then it will always run as a 32 bit application and will always load the 32 bit analysis components.

Regards,

Hassan Atassi
Senior Group Manager, Digital Support
0 Kudos
Message 4 of 7
(6,039 Views)

The application configuration (in Visual Studio) is definitely x86.

 

Which is why I asked these questions in the first place.

 

Why would the 32-bit dlls seem unwilling to run -

 

Please remember: the SAME xcopy setup works fine on win7/x86; the application gets "failed to load dll: nialys.dll" on x64.

0 Kudos
Message 5 of 7
(6,034 Views)

Hi ralph_L,

 

I built an x86 XCOPY deployment of the BasicSignalGeneration example on a windows 32-bit computer and was able to deploy it to a Windows 7 64-bit machine sucessfully.  Here is a screenshot of the files I included in my deployment:

 

undefined

 

This was built using Visual Studio 2008 and Measurement Studio 2010.  I was wondering what software versions you are using when you create your deployment.

Regards,

Hassan Atassi
Senior Group Manager, Digital Support
0 Kudos
Message 6 of 7
(5,998 Views)

Thanks Hassan; I'll try this in the next day or two..

We appreciate the help.

 

0 Kudos
Message 7 of 7
(5,995 Views)