InstallShield adding diffrerent prerequisite for x86 and x64 - installshield

I want to add different version of Crystal Reports as a setup prerequisite using InstallShield depending on platform. For x86 32bit version should be installed, for x64 - 64bit.
What kind of condition should I add to do so? I've found that I can select particular OS as condition but there is no option to just select 32 or 64 bit.
Thanks in advance.
UPD1: In InstallShield I can choose the following types of condition:
Check if registry entry exists. I wanted to check for WoW6332Node
but then I found that this node can be listed in 32bit OS:
http://support.microsoft.com/kb/2582176 Also I found that I can
check some registry entries
https://superuser.com/questions/290906/check-if-32-or-64-bit-windows-os-via-registry/290929
but I'm not sure that they present in all windows versions.
Check if certain file exists. I can check some file in Program Files
(x86) folder to detect 64bit OS, but it's not a good idea in my
opinion.

I think you can use the VersionNT64 property for this.
More details can be found here:
http://msdn.microsoft.com/en-us/library/aa372497(v=vs.85).aspx
Edit: As it can be seen in the documentation, this property is only set on a 64-bit computer otherwise it is empty.
EDIT: 13.VIII.2014
After the prerequisite has been selected to be added to your installation package, a feature has been assigned.
So, you can go in the "Features" view and select the created feature. I can see it has a Condition field, most likely there you can use the VersionNT64 property.

Related

How can I fix Microsoft Visual C++ 2017 X64 Minimum Runtime error during installing Redistributable packages (VC_redist.x64.exe, VC_redist.x86.exe)?

During installation I get "The feature you are trying to use is on a network resource that is unavailable" and prompt to specify some path to vc_runtimeMinimum_x64.msi. After providing some path to required file I get error states that this file doesn't match required version Minimum Runtime 14.14.26405.
I finally found the solution reading this question: Install vcredist_x64 with VS2017 installer project
I realized that specific VC_Redist.x64.exe files could be downloaded by links like https://aka.ms/vs/15/release/26405.00/VC_Redist.x64.exe, where 26405.00 is exactly the version I was required to fix. Note, that you need version from error text after clicking OK, not from window title.
And the last point is that this exe must be executed from cmd with argument /repair to help me with this issue. Regular execution by double click made no effect.
I found the solution elsewhere. It said to
Fix problems that block programs from being installed or removed
https://support.microsoft.com/en-us/help/17588/windows-fix-problems-that-block-programs-being-installed-or-removed
download troubleshooter button on the link.
Run it - choose option - have problem with installing - it lists programs - choose the missing / problematic visual c++ runtimes in the list
it will run and get fixed.
Repeat for each visual c++ you having problems with. I ran the program multiple times.
I have to thank this comment section for helping me with this problem, since I have not been able to work more efficently with my school, since I din't know what and if a single file somewhere deep down in the computer had to be deleted for this program to work.

ListView Control not installed under Excel-2016

I'm using Windows 10 and Excel 2016 and I tried to install the Windows Common Controls (SP6) using the file mscomctl.ocx.
I performed the following steps:
Copy the mscomctl.ocx file into the folder C:\Windows\SysWow64
Register the file with the cmd prompt regsvr32 C:\Windows\SysWow64\mscomctl.ocx
Referenced the mscomctl.ocx in VBA which appeard then in the list with a checked box
Checked the registry and theres only an entry for Version 2
Step N. 5 would have been adding the control to the Standard controls but None of the common controls does appear in the list.
Does anybody have experienced similary issues?
You need to make sure you install the 64 bit version of ListView otherwise you will not be able to add it.
Actually the ListView and TreeView are already installed by default (at my Win 10, Excel 2016 x64 1902). So there is no need to install something extra.
Just make sure you are on the latest update and click in VBE menu: Extras » Additional Controls … where you should find Microsoft ListView Control, version 6.0:
If you don't find it there is probably something wrong with your installed Office, try to update first, if it doesn't help repair/re-install Office.

Where is $(CudaToolkitBinDir) defined in VS2012

I just installed cuda 6.5 on my computer alongside 5.0 and 5.5, which was working fine. However, the variable/macro $(CudaToolkitBinDir) still points to the 5.5 path. $(CUDA_PATH) is correctly defined as the 6.5 path as well as are all variables that extend it (INC_PATH etc.). The family of macros that aren't capitalized (CudaToolkit____) are still set to 5.5.
I've checked:
the system (Windows 7) environment variables (has the CUDA_PATH family)
the user Property Pages -> User Macros
the Nsight options
Googleing CudaToolkitBinDir didn't turn up anything. I've reinstalled cuda 6.5 to no avail.
Where is the definition located or how can I reset it?
The answer was as follows:
Right click on the project. Select Build Customizations... Select the correct Cuda version.
D'oh!
Check the registry to see if there is a key named InstallDir under HKEY_LOCAL_MACHINE\SOFTWARE\NVIDIA Corporation\GPU Computing Toolkit\CUDA\v11.5.
If it does not exist, increase it and its value is the installation path of CUDA. like this: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.5.
Remarks: replace v11.5 with your CUDA version

Purpose of "Target machine" field in Visual studio -> Linker-> Advanced Options->Target Machine

I'm porting a 32-bit C++ app to 64-bit (using VS2008).
I'm not sure what does this field mean in the VS2008 ::
Visual studio ->Configuration Properties-> Linker-> Advanced Options->Target Machine.
By default it's value is set to "Not set".
Is it compulsory to change it's value to "MACHINEx64" if I want my application to be ported to 64-bit executable.
Yes, this is a very important option. It sets the IMAGE_FILE_HEADER.Machine field in the executable file. The very first field of the EXE or DLL header.
Windows check this when it loads an EXE and knows whether it needs to create a 32-bit or a 64-bit process from that field. The only reason it is a the Linker + Advanced property page is because you don't normally change it. The setting is pre-selected by the project configuration you created. If you get "Not Set" then you are basically doing it wrong, hard to guess what you are doing.
Assuming you have a properly configured project that builds a working 32-bit build for your program, you create the 64-bit build with Build + Configuration Manager. In the "Active solution platform" combobox at the upper right, select <New...>. Pick "x64" in the dialog. Hopefully the other defaults (Copy settings from = Win32, Create new project platforms ticked) are correct for yours. Go back to the Linker + Advanced property page and the setting should have changed to MachineX64.
This option relates to the linker option /MACHINE and is a hint for the linker for what target architecture to link the object code if he (the linker) cannot determine this from the object file. As MSDN states you usually have not to specify this. So no you don't need to explicitly specify this flag when porting your code.

Can i create 64-bit setup using pure InstallScript?

Can i create 64-bit setup.exe file using InstallScript project in InstallShield 2009?
Documentation is only about msi projects.
Or tell me alternative way to use 64-bit registry keys, please.
Technically, no, you cannot create a 64-bit InstallSciprt Setup.EXE. The Setup.EXE is a 32-bit application, but I don't think that's exactly what you were asking.
I think you were asking if you could author an InstallScript package that can run native 64-bit Registry/file system commands, and the answer to that is "yes".
For the Registry, which you specifically asked about, see:
REGDB_OPTIONS
Add option REGDB_OPTION_WOW64_64KEY, and then you can call the Registry functions as you normally would, but they will operate on the 64-bit section of the Registry. To switch back to 32-bit, remove the REGDB_OPTION_WOW64_64KEY option.
When using REGDB_OPTION_WOW64_64KEY, be sure to always remove the setting before you leave your function as this can cause your setup.exe to not create an uninstall log in some versions of InstallShield; so while your setup.exe may run the uninstall it'll leave all of the files on the system because it does not create a Setup.ilg file
begin:
if (SYSINFO.bIsWow64) then
REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY;
endif;
end:
if (SYSINFO.bIsWow64) then
REGDB_OPTIONS = REGDB_OPTION_USE_DEFAULT_OPTIONS;
endif;

Resources