LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Distribution kit calling 32Bit or 64Bit executable

Hello,

 

my CVI app distribution calls an executable that installs a hardware driver. Unfortunately, that executable (DPInst.exe) has separate versions for 32bit and 64bit OSs.

 

Question:

can the distribution kit (CVI 2009) be configured to call e.g.

 

  •  "DPInst32.exe" when my app gets installed on a32bBit system, and 
  •  "DPInst64.exe" on a 64bit system?  

 

or

 

What would be an other solution for that kind of problem?

 

Thanks,

Greg

 

0 Kudos
Message 1 of 3
(3,219 Views)

Hi Greg,

 

That is a reasonable request, but from my user experiences I guess it is not possible or feasible.

 

Every driver or professional software packages I can think of separate their 32 and 64 bit installations.

So the user must be aware of the OS he/she is using and use the correct installation file.

 

Can you think of any contrary examples?

S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 3
(3,199 Views)

Hello Eren,

 

thanks for you feedback. I don't want to distribute and maintain different versions for 32bit and 64 bit OS of my CVI application, just because a small USB driver of an accessory has two versions. In the meantime, I came up with a different idea.

The distribution calls an executable that

a) checks wether it runs on a 32bit or 64bit OS

b) then calls the correct DPInst.exe version

 

This is quite easy:

 

I'm using this  example code to check the OS version.

with that I call this code at the end of the installation:

 

 

void main()
{
 char path[512];
 int status;
 
 status = GetDir (path);
    if(IsWow64()) strcat(path,"\\64bit\\");
     else  strcat(path,"\\32bit\\");
 status = SetDir(path);
 LaunchExecutable ("DPInst.exe");
}

 

void main()

char path[512]; 

int status;  

status = GetDir (path);    

if(IsWow64()) strcat(path,"\\64bit\\");    

   else strcat(path,"\\32bit\\"); 

status = SetDir(path); 

LaunchExecutable ("DPInst.exe");

}

 

This should do the trick.

 

Best Regards,

Greg

 

0 Kudos
Message 3 of 3
(3,180 Views)