Showing posts with label 64 bit. Show all posts
Showing posts with label 64 bit. Show all posts

Friday, January 2, 2009

NSIS Script for 64 Bit Machine

Today i was working on the NSIS scripts. In this perticular script i have to write the registry values in the system. There is a function call WriteRegExpandStr.
syntax: WriteRegExpandStr HKLM "Software\ProductName" "dbServer" "anyvalue"
This function will write the registry value "anyvalue" in the registry with the keyname as dbserver. Now this works good when we have the 32 bit machine. Now when you have 64 bit machine and then this value you won't see under "Software\ProductName" . By default it will be created under the "Software\Wow6432Node\ProductName" . In my case my application reading the data from the Software\ProductName and there is no data as the registry values are written under Software\Wow6432Node\ProductName . Just to keep my code in tacke i have write a small function which will check if the machine is 64 bit or a 32 bit. Depend on the machine type it will get and update the data from the registry. Below is the code
public static string CheckIf64BitOS()
{
int bits = IntPtr.Size * 8;
return bits.ToString();
}

if (CheckIf64BitOS().Equals("64")) {//Write a logic for 64 bit}
if (CheckIf64BitOS().Equals("32")) {//Write a logic for 32 bit}

Hope this will solve your problem.

Friday, October 31, 2008

System.Data.DataSetExtensions


System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.DataSetExtensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Data.DataSetExtensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Hi friend

above is the error comes up in one of my current project. This is a particular problem comes when we convert our 1.1 or 2.0 framework application to 3.5 framework. In my project my client is having problem while installing our application on the 64 bit machine. I have started in the intention that i will just install the application and that's it. But it took half an hour or so to just install the application with one fatal error 1603.  This error occur because of three reason given by MSDN

The folder that you are trying to install the Windows Installer package to is encrypted.
The drive that contains the folder that you are trying to install the Windows Installer package to is accessed as a substitute drive.
The SYSTEM account does not have Full Control permissions on the folder that you are trying to install the Windows Installer package to. You notice the error message because the Windows Installer service uses the SYSTEM account to install software.

But i was just happy to ignore this error as my application was installed even after this error.  Now the only problem left with the reports. when ever i am try to create the reports it give me error like above.

While checking for the solution i come to know that the client don't have the hot fix for the 3.5 framework. In the above image you can see the properties. There is a red color circle which shows the version as 3.5.0.0 But the client system has only run time of the 3.5 and in the run time this particular .dll file is not present. I am getting this error as i am using this .dll file for the Type Data set. 

Solution. Just download the framework 3.5

http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en

and run it on the system. that's it.