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;
Related
I have a history of Installscript MSI installers (that have been replaced by Basic MSI installers), and when I uninstall them I need to know if the uninstall is being run silently or not. I run some custom code that checks for the existence of .iss files (necessary for silent uninstalls) and if they're not there I pop up a message saying that the files aren't where they're expected to be. The problem is that when the program is uninstalled from the Control Panel (not silently) this code runs and displays the message. So I need a system variable that will tell me it's running in silent mode so when it's not I can suppress the message.
I can't find anything that tells me this. Does anyone know of a way I can tell programmatically?
Assuming you want to detect a silent install from within the install, the answer depends on the project type:
InstallScript projects can check whether they're running silently by comparing the MODE system variable to SILENTMODE
Basic MSIs can compare the UILevel property to 2
InstallScript MSIs can check whichever is more relevant for the context (using MsiGetProperty to retrieve UILevel, if necessary, but watch out in deferred custom actions; they'll need to pass it through CustomActionData).
For completeness, but unlikely to be relevant for your question, Suites can reference the ISSilentInstall property.
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.
Currently my installer is need user to choose which type of setting they want to use when install. Lets say got setting A,B and C.
If want to make this in silent installer. Is there any method can use?
I'm using install shield.
You can set PUBLIC PROPERTIES inside the MSI file from the msiexec.exe command line like this:
msiexec /i test.msi /qn TESTPROPERTY=1
These properties are the ones you have hooked up to values input in the GUI. They are now set by the command line (or defaults are used from the Property table) and the entire GUI section of the MSI gets skipped on install.
Here is a sample showing how INSTALLDIR is hooked up to the GUI (Wise for Windows Installer shown, same concept in Installshield and other MSI tools):
To play around with complex command lines for msiexec.exe I always recommend this nifty tool from Altiris: http://www2.wise.com/filelib/WICLB.exe - broken link, resurrected from Wayback Machine, seeing as the tool was freeware I assume that is legal - (see a screenshot of it here: installation using msi.exec open help options every time). Please run the download by virustotal.com for safety.
I finally have my C++ Builder 2010 installation the way I want it, with all my components upgraded and installed. (touch wood)
I have been working with C++builder since version 1 and I know from countless previous traumatic experiences that this state of affairs could change in an instant. I would like to backup the installation and component set.
Is there a way to do this? A tool perhaps? A menu command that I have maybe missed all these years? I don't want to have to reinstall all the components from the bpl source again.
I make nightly backup images of my entire drive, I would like to do this for c++builder only if possible.
If it's a matter of simply copying files, which files would I need to copy? Are there entries in the registry that would need to be restored?
Thanks in advance for any thoughts and suggestions
The HKCU\Software\CodeGear\BDS\7.0\ registry section contains the "known packages" subtree that contains which components you have installed. reg export/import should save you some trouble.
You'll also want to backup/restore the actual files referenced there as well.
It has been a while since I used C++ Builder, but I will make two suggestions...
1) run regedit and looks for "builder". You will probably find a hive like hk_local_machine/software/codegear or such. Export that and you can import it later
2) have a look at GExperts - is they don't have the exact solution, they still have some pretty useful (and free) tools
Is there any option to copy some of the files (pre installation) to the system before onFirstUIBefore() method. These files are also part of installer.
I am using install shield 2009 and project type is installer script.
EDIT:
Some more info. we need to run one utility which is part of setup.exe package. It should be run first in the OnFirstUIMethod() before showing up other dialogs to the user. There are around 5 dialogs in OnFirstUIMethod() method. The utility has some complex code and it's functionality can't be done with installer scripts (that's why this utility). My requirement is this utility should be part of installer package. Any thoughts are welcome.
If you add filed to the Support Files/Billboards section of the project, you can reference them in your project and specifically in OnBegin.
For example, if you have a file called foo.exe that you needed to execute, you could add it to the project as a Support File and the reference it using the SUPPORTDIR keyword. It would look something like this:
LaunchAppAndWait(SUPPORTDIR ^ foo.exe);
The OnBegin event is the first place you can do custom things in an InstallScript project, like copy files.