I've packaged my vb.net project with an installer project and installed it on my pc. Now, how can I make an update patch if I want to update my installed program? I'm using Microsoft Visual Studio 2010. I've tried to Google on this issue but instructions are unclear to me.
One way to do it is as follows:
If the installer package installs your application into the fixed location, i.e. when user can't select where to install, you can always have your update package go to that same location and replace your assemblies.
If the location is dynamic, your initial installation needs to leave some registry keys/values related to the location. Then your update package can get the location from the registry and replace the assemblies based on that data.
Related
I am using Aspose to do some doc management and our license only gives us a year of updates, which now has expired. So when, in typical fashion, we update our packages and get the latest version of Aspose it breaks our app. Is there a way to lock down those packages from showing up in the Nuget Package Updates list, or at least to prevent changes to the versions via the the Nuget Update process? I looked at various Nuget and Microsoft references and didn't see anything, but am hoping someone here knows some secret sauce?
The two ways I can think to do this:
Create a new Nuget package that you dont rev that contains the references you want to lock. that way they would just never show up in the update list.
Create a test like #mason suggested. I would start with code that finds the assembly with the name you want to lock then you can check its version. you can either write it as an exact match (easist) or not to exceed a specific version (more work but you could use an earlier version)
I know this question is old but there is an attribute you can add in the packages.config file that locks the version as Matt Ward answered here:
Restrict nuget package updates to current versions for some packages
For us it was the UmbracoCms package that had breaking changes in the next version.
<package id="UmbracoCms" version="7.15.5" allowedVersions="[7.15.5]" targetFramework="net472" />
You can find more information about version restrictions here
One way is to just stop using NuGet for it and reference the DLLs manually.
Look in the bin folder (where your compiled project is) and copy any Aspose.* files to a new folder in your project directory.
Uninstall the Aspose NuGet packages.
In Visual Studio Solution Explorer, right-click 'References' -> 'Add Reference' -> 'Browse' -> 'Browse' and pick the DLLs from the folder you created in step 1.
I have two projects as mentioned below.
VSTO Project(Word Add-In)
Installer (.ism) project to create installer for above word add-in
Recently, I have made some changes in above both the projects to replace old brand name with new brand name.
After these changes, installer does not uninstall already installed add-in and instead it installs second instance of add-in(having different product name). Earlier, it was able to uninstall existing word add-in.
Please note that I have not changed Product Code and Upgrade Code in ism file.
Now, I want to make installer (created using Install Shield project) capable enough to uninstall existing word add-in (having old product name) if it exists.
The word Add-In is being used by our many clients and after re-branding we want them to re install Add-in. We don't want them to manually uninstall existing word add-in. So, we want to make changes in installer so that it auto detects existing add-in and uninstall it and then install new one.
I am new to the install shield and don't know what is the best and simple way to achieve this.
I am not familiar with the latest iterations of InstallShield, but at a minimum you can call vstoinstaller.exe to remove it at the start. It's usually in C:\Program Files (x86)\Common Files\microsoft shared\VSTO\10.0.
I am a Wix novice, first of all. I am trying to create an installer using Wix. I am using Visual Studio 2012 and I have Wix toolkit installed.
In my installer I have a version.ini file which contains the version information. During each build, the version.ini file will be updated. I need to create a folder using the version specified in version.ini and copy some files to that folder created during installation. I prefer the version.ini should not be deployed during installation.
I went through some threads here. What I got is since the version.ini file is present during build time, we need to use it rather than creating custom actions. But I don't know how.
Can someone help? I really appreciate if you could provide sample code.
Thanks,
ssn
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 already an installer for our application. but it is exe-file. it was created many years ago.. application of course was updated. we used a bat-file to register new dll-files and to install our service(windows). but we want to do all this by installer not a bat-file. we chosen a wix techology. i read about <Patch> node, but to use it i need an msi from previous version.. i think to do a simple installer, that will stop service,copy and register dll in the installed application's directory, install service. but i don't know will it overwrite the files without any problems?
You can only create an MSP (Patch) for an MSI (Installer). Also, you're going to run into component ref counting problems if you install your components into the same directory as the original install. The problem is MSI will go to see a file is already there, make it as a shared resource and increment the usage counters. Then on uninstall it will decrement, see that it's not 0 and remove to uninstall the files.
I'd suggest installing to a new directory and then using the RemoveFile table to get rid of the old files. Also I'd suggest following good CM / Versioning practices so that you don't have to worry about hacks such as Version Lying.
If all your application just needs to xcopy files, setup a directory and maybe even a ShortCut, it should be a piece of cake.
Versioned files like executables will automatically be overwritten if the version of the file number is lower.
See also Copy if not exist in WiX.