Intallshield Programming - Reboot behavior - Windows does not ask user to close open files before restart - windows

My engineer send me 2 versions of installation software for evaluation (made with Installshield), which he said he has made no changes to the Restart settings, but just changes messages in dialog boxes.
However, when tested on Win 8 and Win 7
One version will restart Windows while Windows does not prompt there are applications with open files
One version will attempt to restart Windows, but then Windows will prompt there are applications with open files
I am not a programmer, but I would like to know what may be possible cause of this difference? And what is the setting which can cause the 2 different restart behavior.
Then I would like to know how can I test the installation software to make sure it is designed properly and make Windows attempts to restart properly such that it won't force a restart if there is any open files; after all, making users lose their work is very bad.
Thank you very much.
John

If your Installer installs any prerequisites, it may be possible that the reboot is required to install the prerequisite properly. So it is possible that the prerequisite would be installed when you wold have installed your product for the first time and it would have asked for the 'Restart'. And now as the prerequisite is installed, no need to reinstall it so 'Reboot' is not required.
If this is the case, you can go to'Application Data' > 'Redistributables' and edit the prerequisite. Here you can specify appropriate condition to handle the 'Restart' behavior.
If your application doesn't install prerequisite and it is your product that requires a reboot, please have a look at this answer. You can configure a property to handle the 'Restart' properly.

Related

Is there a "best" way to forcibly "uninstall" a product when the MSI fails during uninstall?

My install fails on uninstall because of a bug in my CustomAction. I've fixed the bug, but I now have a test machine with that product installed and I can't get it to uninstall (keeps rolling back and staying).
In the past (years ago), I used msizap.exe that comes with the Windows SDK. But it doesn't seem to come with it anymore. I installed it and can't find it. My only guess is that it's no longer relevant in Windows 10.
Anyway, is there a best way to forcibly remove the product so that Windows no longer thinks it's installed?
msizap.exe: You are correct, msizap.exe has been deprecated long ago.
Broken Uninstall Workarounds: This problem is very common. You can find a list of approaches for these kind of uninstall problems here.
The easiest and fastest is probably to just use the Microsoft FixIt tool to remove the package. This basically "unregisters it" by the looks of it, and is similar to msizap.exe in that regard.
If this is just a single machine you can hack the cached installation database using Orca (how to find cached msi path, powershell version, using Windows Explorer - point 2) - if it involves many machines you should make a patch. Please see details in link above.
Virtual Machines: It is obvious, but just to mention that you should check setups on virtual machines so you can just revert the virtual machine when you encounter "development and QA bugs" like these.
Custom Action Flag: You can also add a condition to each custom action so that you can disable the whole custom action from running by a custom command line sent to msiexec.exe.
If your flag is a property RUNCA="1", then you can disable it by setting this flag property to 0 via the command line - this is sort of a little inoculation for the package's uninstall feature breaking - you can disable custom actions from running at all during install / uninstall - it might even be useful for your tech-support guys and real-world installations:
msiexec.exe /x {PRODUCT-CODE} RUNCA=0

System Registry Error VB6 running as User Windows 10

I just recently upgraded to Windows 10 and ever since I have upgraded I can't get into VB6. I keep getting the System Registry error. I have googled and tried about everything and nothing seems to work. Running VB6 as Administrator is not an option, don't ask but we can't have admin to our computers we have to be logged in as users. The way we use to fix it was to trick Windows 7 log on as Admin run VB6 as Admin then switch me back to user and it worked, but this no longer works. Does anyone have any suggestions that currently have VB6 working as a user and not admin? I really don't want to resort to have to run it out of my virtual machine :( Thanks in advance!
Amanda,
I know it is 3 years later and I wonder what you did. and my solution may be late.
I moved VB6 Enterprise to a Windows10 machine, I did not upgrade the machine to Win10 with the IDE. However to make it work for some of my clients with Win10 machines I:
Back up all the VB6 files, folder and directories.
Using control panel in Win10, uninstall VB6 app. That's right, uninstall!
Using the original install disk, running it as an Administrator, install the program.
If the program has been updated to a later version, you need to get a copy of the latest version and copy over the one that was installed.
Or, Sweet Talk your IT guy into making you a new install disk with the latest version you are supposed to be running.
Go to the folder where the exe file is installed, Right Click on it and open the Properties, and go to the Compatibility tab.
Choose run as an administrator, and also click the Run this program in compatibility mode for Windows XP Service Pack3, or if it shows Latest version of Windows XP try that. You may need to check with your IT department.
Warning: if the VB6 program uses any non-Microsoft tools you may need to register them by hand.
I suspect this has already been worked out for you, but I put it here for anyone that may stumble across it, needing it.

Visual Studio Installer Projects for 2013 -- can't uninstall a program on Windows 8.1

I'm trying to use this Visual Studio extension for 2013, which recreates the built-in installer functionality from Visual Studio 2008/2010: http://blogs.msdn.com/b/visualstudio/archive/2014/04/17/visual-studio-installer-projects-extension.aspx?CommentPosted=true&PageIndex=2#comments
It works, allowing me to edit the project as before. It has the install and uninstall commands when right-clicking the install project, too. It installs fine.
When I try to uninstall, though, I get the following error and then the uninstall rolls back:
Could not open key: HKEY_LOCAL_MACHINE32\SOFTWARE\Wow6432Node\Microsoft\
EAPSIMMethods\18\FastReauthContext. Verify that you have sufficient
access to that key, or contact your support personnel.
I am not doing anything with that registry key, and there don't seem to be any relevant results on google-- at least not in the normal top 5 pages. Does anyone know what causes this or how I can fix it?
While I am not able to uninstall, I am able to increment the version of the package and allow it to remove the previous install and install the new version (all at once) successfully.
I am using Windows 8.1 Pro 64 bit, the projects are compiled for <AnyCPU>, and the installer is configured for x86.
EDIT I am running Visual Studio as Admin. When uninstalling from the Control Panel, I am also clicking the 'allow' button in the UAC dialog window that pops up.
I know how to give myself access to a registry key (permissions). I want to know why this key is trying to be removed. I support this app on several machines and I don't want to have worry about remembering an uninstall hack in the future.
EDIT This only seems to be an issue for a 32x installer on a 64x OS or a Windows 8 issue. I was able to use the same 32x installer to successfully uninstall the app on a 32x Windows 7 machine.
This must be an environmental problem, that key doesn't have anything to do with installers. EAP-SIM is an authentication protocol for wireless networks. The FastReauthContext key almost surely was meant to avoid having to provide a username+password each time your machine reconnects to the network. Which makes the registry key content very sensitive of course, it can only be read by a service that runs with the System account.
So, something goofy going on with your networking setup. Verify that you can successfully reconnect to such a network. If you used a VPN before then make sure it is active again. Something like this. Update your question with anything that might be relevant to networking when you first installed the app.
I have had similar problem and what I found out this is caused by MSI attempting to delete whole "Software\Microsoft" section in the registry. Lucky you that it encounters this error and rolls everything back.
So the solution is the following:
Since you have installed your program whenever you try to uninstall it the system will run msi from cache that is usually located C:\Windows\Installer.
Find your package in the cache. Here is an article that may help you http://csi-windows.com/blog/all/27-csi-news-general/334-identifying-cached-msi-packages-in-cwindowsinstaller-without-opening-them
Open the package in Orca. You must do this as administrator.
Go to Registry table and find record with "Software\Microsoft" as a key. Most likely the Name column will contain either "-" or "*" value. This means that during uninstall MSI will try to delete whole "Software\Microsoft".
Either change the Name value to empty or "+" or try to change key to something like "Microsoft". The second option will cause that installer will not find the key to delete during uninstall, but it will skip this error and let you uninstall your program.
You installed an untested installer on your dev machine? Speaking from experience, don't do that! Snapshotted VM's are cheap and will save you from this sort of pain.
Visual Studio Deployment Projects (or VSI as it's now called ) is known for creating very poor quality installs. The combination of those two put you where you are today.
I would need to look at the full uninstall log and your MSI using ORCA to understand exactly what is going on. MSI Zap and a manual cleanup of resources is probably required at this point.

Sandboxing applications

I have an application (Installed as a service) that has 5 different versions. For testing I need to have all 5 installed. Currently I have to uninstall the application and reinstall the required version.
The application has a single exe (in Program Files\App) along some an xml file containing it's settings. This is installed via an MSI file. Each version has the same file\service name and checks for previous versions before installing.
Any ideas on a way to run all five versions at the same time?
First of all, I assume you're a developer, not the QA person. The QA need to use either virtual machines, or just 5 separate PCs. What I'm describing is a dirty hack that might save you some time.
Install version #1 to C:\program files\YourApp_1
Launch services.msc, stop the service, change the startup type to manual.
Launch regedit.exe.
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services key, find the key for your service, rename the service: change both the key name, the "DisplayName" value, and to simplify your life write something meaningful to the "Description" value, e.g. "MyApp 1.0 - this is the reference version".
If the installer checks some other keys before installing (it might be e.g. in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YourApp), remove them. If you don't know those keys - use SysInternals ProcessMonitor to get them (set filter to instmsiw.exe or something, then launch the installer, wait for the "the prevoius version was found" message, alt-tab to the ProcessMonitor, stop logging, and read the log bottom-to-top)
Now install version #2 to C:\program files\YourApp_2, repeat the process.
At the end, to switch versions you'll only need to launch services.msc, stop the version that's currently running, start another one. Or use net start / net stop command line commands. Or whatever.
P.S. Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
Though this is more of a Sever Fault type of question:
http://www.microsoft.com/windows/virtual-pc/
There's yer answer :-)
Use virtual machines for each of your 5 different versions.
VMWare player is free: http://www.vmware.com/products/player/
Use VirtualBox.
Create one test system, configure it, then clone it 5 times (you'll have to use vboxmanage), and install one version on each of them.
If it wasn't a service, I had suggested Sandboxie, but I doubt that Sandboxie can handle services.

InnoSetup: Check oldest version of app and show info message

How to check that oldest version of application was installed during process of installation new version? What do I mean? I want before start installation start check process with dialog "please wait", if my installation found old version I can provide dialog "update or delete old and install new".
How can I do it?
Thanks.
I'm not sure whether this can be done at all, as running an InnoSetup-setup always assumes that you want to install new or update an existing installation. I don't think you can switch a setup from "installation mode" to "uninstallation mode" upon user's choice as you'd like it to do.
InnoSetup works differently than Windows Installer at that point. It has a separate installer and uninstaller as opposed to Windows Installer, which "contains both".
If you want that feature, you may want to look into Windows Installer XML (WiX), which creates MSI setups and can do exactly what you're looking for.
EDIT
First of all, thanks for the downvote. I don't quite know why anybody would downvote a perfectly reasonable reply, but I guess I'll have to cope with it.
To answer your comment about BeforeInstall: If you read the documentation you will notice that BeforeInstall is called before an item is installed. Quote from docs:
The name of a function that is to be called once just before an entry is installed
What you want to do comes down to:
Decide whether the user should be able to choose if he wants to install or uninstall when setup is run
install or uninstall depending on user's choice
What I'm trying to say is that as far as I know you can not switch from installation mode (setup.exe is run) into uninstallation mode (uninstall.exe is run) from your installation script.
InnoSetup assumes that running Setup.exe is equivalent to wanting to installing or upgrading. I the user had wanted to uninstall, he would have run the uninstaller, not the setup.

Resources