Posts

Showing posts with the label x64

VBScript to Determine 32-bit or 64-bit machine

Often we come across a situation where we need to see the Operating system bit information and then install application or do any customization. Here is a script which I use for this purpose: '=============================================================== Const HKEY_LOCAL_MACHINE = &H80000002 'Lines to get the computer Name Set wshShell = WScript.CreateObject( "WScript.Shell" ) strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )   '=============================================================== 'To check whether the OS is 32 bit or 64 bit of Windows 7 '=============================================================== 'Lines to detect whether the OS is 32 bit or 64 bit of Windows 7 Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputerName & "\root\default:StdRegProv")   strKeyPath = "HARDWARE\DESCRIPTION\System\CentralProcessor\0"   strValueName = ...

Creating MSI for x64 and x86 machines

For some time now I have been packaging for x64 and x86 machines, and have faced numerous issues while creating the MSI for x64 machines. Well MSI will mostly work in x86 because of less complexity of 32 bit machine. There always seems to be a problem when you try to install the application in 64 bit environment. Registry Structure: The Registries install differently in 32 and 64 bit machines. in 64 bit machines, there is a provision to install 32 bit applications registry and this goes in SysWOW64 folder. By default all 32 bit installers install the registry in SysWOW64 hive. If you need to install the registries in normal mode as in directly in the registry as it was in 32 bit machines, then you need to change the Component in your MSI to 64 bit component. This will ensure that your registries are to be installed as 64 bit and not 32 bit. You might face issue in compiling your 32 bit application with a 64 bit component. I would suggest you to compile your Application with 32 bit comp...

Windows 7 Language Pack Installation and Un-Installation on 32 bit and 64 bit Machines

Recently I had to package Window 7 MUI for around 13 languages, both for 32 bit and 64 bit machines. I could not get any complete documentation for Installing, Un-Installing and making it work with the Deployment tool. I thought to write this article so it reduces the work of people who still have to make Language packs as a package. Windows 7 Language Packs come in a DVD and generally have a cab file called, lp.cab for all the languages in their respective folders. Following are the main command lines to be used while installing and Un-installing the Language Packs: Installation: dism /online /add-package /quiet /norestart /packagepath:lp.cab and Un-Installation: dism /online /remove-package /quiet /norestart /packagepath:lp.cab The lp.cab file can be copied to a temp location by your MSI and then a setup.bat file would be required to run the above command line. I had copied lp.cab, setup.bat,setup.vbs, uninstall.bat and uninstall.vbs to “%windir%\temp\ ” folder. Here are the uses of ...

Context Menu Creation for gVIM application in x64 machine

I was stuck in an application where I had to use the 32 bit source for both 32 and 64 bit machines. The application seemed to work fine, except the context menu option in x64 machines. I found a great post by David Vielmetter on his blog http://davidvielmetter.com/tricks/context-menu-issues-with-gvim-in-windows-7-x64/ and I was able to solve the issue. I think context menu many times create an issue in 64 bit machines and this is a good way to solve them (This is entirely my point of view). If someone has some better suggestions, they are most welcome to comment here. I too would like to learn more on how to create 64 bit context menu options.

Context Menu for WinMerge appliction in x64

WinMerge application has the same source for x86 and x64 machines. The application works fine when packaged in MSI for x86, but the same application will not work on x64 as the context menu option will not be visible. To get the context menu option, follow these steps: 1) Install the source on 64 bit machine and from INSTALLDIR, copy the ShellExtensionx64.dll file. 2) Register this Dll file and keep its registry information in a reg file. 3) The 32 bit version of this ShellExtension is ShellExtensionU.dll, hence make the component of this .dll conditionalized to be installed only on 32 bit machines. For this you can write the Condition as: (VersionNT32) 4) Create a 64 bit component and import ShellExtensionx64.dll and its registry in it. The condition to make this component install only in 64 bit machines is: (VersionNT64) 5) Also keep in mind to launch the application before taking a second snapshot of the application. This will include some HKCU registry keys which go in HKCU\Softwar...