How can I provide an option to create desktop shortcut of my application exe while it is being installed silently using cmd with option /quiet?
I am using managed bootstrapper UI.
While installing through installer exe via cmd, may be some command argument along with /quiet I should be be able to provide which can decide to create shortcut or not but I am not sure how to do it.
May I know is there any way to achieve this?
Where should I declare the variable and how to set this using cmd args?
Related
I'm looking to create a Windows Installer package that will run an exe that runs another Windows Installer.
I'm putting a package together that has to install three files, an EXE, a CONFIG and an empty TXT. In addition, we also need to run the Access Database Engine 2007 as part of this process. However, when setting custom actions to just run it (with the flag /quiet) it fails because it's attempting to run an MSI inside of an MSI.
Is there any way I could somehow have it launch right after/right before or something? I've looked into WIX but honestly I'm clueless on how it would solve the problem.
Thanks.
You should look at the WiX Burn functionality and prerequisites. Some examples are:
WiX - Install Prerequisites and 3rd party applications
http://www.c-sharpcorner.com/UploadFile/cb88b2/installing-prerequisites-using-wix-bootstrapper-project-and/
You could probably just run the setup from the Burn bootstrapper - it will do its own detection if it's already installed.
I made an MSI installer using WIX. installing on windows 7 is no problem bud on windows 7 embedded something funny is going on. when the software is installed it does run, bud not properly. I found out it had something to do with administrator permissions. the executable doesn't start as administrator, which it should since only then it runs properly. I could set it manualy bud i prefer to do it automatically via the installer. Can this simple be done as described in this thread and put in a VB.NET script? or is there another better way?
note: the executable always needs to run as administrator, so the setting needs to be permanent.
thanks in advance.
F.Jansen
Is this an executable that you have control over and also is this a VC++ executable ? If yes, I would suggest to re-compile this executable by making it UAC compliant. This would involve re-compiling the executable with the appropriate flags as stated at:
https://msdn.microsoft.com/en-us/library/bb384691.aspx
/MANIFESTUAC:level=_level
Set the value of _level variable to :requireAdministrator
Doing so would make the executable UAC compliant and then launch it always with Administrative privileges. This is the recommended way for all UAC compliant executables starting with Windows Vista or higher.
You can read more about UAC at: https://technet.microsoft.com/en-us/library/cc709628(v=ws.10).aspx
What you are trying to do as highlighted How to set "Run this program as an administrator" programmatically , exists just for the purpose of back ward compatibility. If the .exe that you are trying to launch is a legacy exe, then this might be the way to go. Make sure that if you follow this approach, it exists in the latest version of Windows.
Hope this helps.
Suppose that you have an installer (not a wix installer) that you downloaded from somewhere. How can you know UpgradeCode of that installer so that you can fill it in in the UpgradeCode section in the new installer that you prepare?
Can I learn it from registry somehow? So the question is basically, how to know the UpgradeCode of a program that is installed in the computer.
Actually my problem is that my product has been installed with another installer and I am now trying to move it to wix installer. However, I can't find upgrade code in previous installer and I want to find it from installed software.
Thanks.
As I posted to WiX users:
I've seen this done by having the upgrade get the uninstall string from the registry, where there should be a command you can use since it's not MSI-based. Whether you should call it in the UI sequence or the execute sequence or both depends on your requirements for silent installs, meaning that you'd need to do it silently in the execute sequence, and perhaps need to alter the uninstall command to make it silent.
The same general idea should work if that install has a standard uninstall shortcut you could get the command from. Either way, you're just using a CA to run an external program, or maybe a Util
CAQuietExec kind of thing.
Assuming it's a Windows Installer based installer ( WiX, InstallShield, et al ) you can edit it with ORCA and look at the Property table to see it's UpgradeCode. You may have to first extract it if it was packaged as a self extracting installer.
You can also query the MSI API or look in the registry (HKCR\Installer) for this information. If you go the registry route it's probably easiest to look at the Products/GUID/Sourcelist key and trace it back to a cached MSI and look at it in ORCA. Otherwise you have to learn how to join different datasets and convert Darwin transformed GUIDS back to their original GUID format.
Fire up PowerShell (run as admin) and run this command to get a list of installed products with product code:
Get-WmiObject Win32_Product | Format-Table Name, LocalPackage
You will get a list of all installed MSI products, and a weird looking path to the local cached MSI database. It normally looks something like this:
C:\Windows\Installer\235bbf8.msi
The 235bbf8.msi file name is random, and will be different for each installed product. It is a cached copy of the MSI file that you originally installed. It does not contain cab files (or at least it didn't in older versions of Windows).
You can open that file with the random name from Orca by chosing File -> Open and then pasting in the full path to the file open dialog, and then pressing open. Don't make any changes but check the upgrade code in the Property table. You can also use other MSI tools such as Installshield.
Note that the path C:\Windows\Installer is "super protected" and is not even visible in Windows Explorer before you enable the show hidden folders AND you disable the protect operating system files option. I still believe you can open the file directly if you paste the whole path into Orca - no need to go via Windows Explorer.
I have my contextmenu shell extension dll. I have used Heat.exe to create component for my dll and in install it works completely fine.
But I am not able to register my dll using wix installer.
I have tried various options and nothing is working.
If I try to do manual registration using regasm.exe /codebase Myfile.dll it works.
Regasm /regfile ( and therefore heat or InstallShield ) has a known behavior of not writing out user registration data. In this situations you need to install your software on a VM and use a tool to capture the registry before and after running regasm. Then perform a difference report to see what was changed. Take that and author it into your WXS.
Finally reset the VM and run your new install and verify that it worked.
I have a WIX project that is creating an MSI to install an Excel VSTO application, including desktop shortcuts to launch the application. The installation and shortcut creation is working fine. But I need to be able to launch the application by executing the shortcut after the installation has completed. I've seen guides on how to launch an executable, but nothing for a shortcut. Is there some way of doing this that I'm missing?
Thanks!
How is launching shortcut different from launching the executable? I mean the shortcut points to an executable plus maybe some command line arguments. The result is a running application anyway, then why bothering?