473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to create initial installer and upgrade installer?

Hi,

I'm currently developing an application for a POS Terminal using VB.net. Our project is approaching the last stage of development and I've been tasked to create 2 installers. 1 for Initial Installation, and the other for upgrade installation.

The project is composed of several elements. These are:
1. The application executable
2. Common DLLs that we developed
3. some resources (.resx and XML)

The requirement for the upgrade installer is that only those files with modification should be installed. (i.e. if only the xml or resx files are modified those are the only items that will be reinstalled, since the size of the upgrade installer is a consideration so we cannot reinstall everything).

I'm using Visual Studio 2005 for my deployment project but I'm a bit confused about how to set the properties of each file in such a way that during the upgrade, only the files that were modified would be updated and the rest of the files will not be removed since I'm setting RemovePreviousVersion property to True. I have a hunch that I need to do something with the custom action but I haven't been able to figure it out.

The upgrade installer setup is almost the same as the initial installer except that all files are excluded.

Could someone help me please?

I tried to acquire a copy of Phil Wilson's book (The definitive guide to Windows Installer) but its not available in our local bookstore and it would take too long to order it.

Basically while tinkering with the settings/properties there are instances where the dll was not updated and there are also times when the application exe was removed.

I already verified that the Product code is the same for both installers and that I'm sure that the version number is being incremented for each upgrade.

If I will be redoing both installers from scratch, how should I go about it?

I'm also confused about the Condition property and the transitive property.
Aug 12 '11 #1

✓ answered by Raymond Wee

Hi Paul,

Thanks for the response. Unfortunately we are not allowed to use third party applications to build our installer. However, I was able to come up with a workaround.

The first time installer, I set permanent to true for all files.

For the upgrade installer, I modified the directory of the files to be updated. Instead of putting it in the application directory, I put it in a temporary folder.

Then in the commit custom action, I added a upgrade vbs file that would perform xcopy from the temporary directory to the target directory.

Its a bit crude but at least it works. My only problem now is the command I used to remove the temporary directory is causing a script error. The command I used is listed below:

Expand|Select|Wrap|Line Numbers
  1. Dim osShell
  2. Set osShell = CreateObject("WScript.Shell")
  3. osShell.Run "del /F /S /Q C:\tmp"

6 2044
InstallShield looks to be a solution here as it offers both install and update facilities (or did last time I looked)
Aug 12 '11 #2
Hi Paul,

Thanks for the response. Unfortunately we are not allowed to use third party applications to build our installer. However, I was able to come up with a workaround.

The first time installer, I set permanent to true for all files.

For the upgrade installer, I modified the directory of the files to be updated. Instead of putting it in the application directory, I put it in a temporary folder.

Then in the commit custom action, I added a upgrade vbs file that would perform xcopy from the temporary directory to the target directory.

Its a bit crude but at least it works. My only problem now is the command I used to remove the temporary directory is causing a script error. The command I used is listed below:

Expand|Select|Wrap|Line Numbers
  1. Dim osShell
  2. Set osShell = CreateObject("WScript.Shell")
  3. osShell.Run "del /F /S /Q C:\tmp"
Aug 12 '11 #3
Shouldn't osShell be set as a type? MSDN thinks it should (assuming the type is Shell), mostly for checking the return value.

If you're moving a file, why not just use System.IO.File.Move - you're assuming the target machine has xcopy on it!
Aug 12 '11 #4
Hi Paul,

I'm sorry, I'm just a beginner in vbs and the only reason I chose to use vbs was that its one of the allowable types when adding a program in custom action. I would have preferred using .bat. Regarding the code posted above, actually I just copied it from some existing script and modified it. The problem isn't actually osShell since before the delete statement I used osShell.Run to execute the xcopy function. I had some readonly files in the directory I'm supposed to delete so I'm wondering if the error is because of that, although based on the help of "del", "/F" should be able to handle that. besides its working when run under the command prompt.

Regarding xcopy,
I thought its a standard windows command. You mean it isn't part of the system commands in windows? The terminal I'm installing the application to uses WEPOS so I assume that it has the basic windows commands including xcopy.
Aug 13 '11 #5
it's a DOS command, so there isn't a guarantee of it being there. /F should have forced the delete, but again - things change...
Aug 13 '11 #6
Hi Paul,

Thanks for all the advice. I decided to move the statements out of the vbs file and into the batch file that called the installer. At least that way, I can control the result of xcopy in case there are errors, and also I found out that I should use rmdir instead of del since rmdir already covers deleting files and folder while for del, only the files are deleted.
Aug 16 '11 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Jeff_Lav | last post by:
I'm doing a strong named assembly in vb.net that as a reference on the msi.dll. With the command tlbimp.exe i assigned a strong name to msi.dll and create à new dll called : msisnk.dll. Since...
2
by: Lauren Wilson | last post by:
Hi folks, I am confused about how to create a stand alone installer to install Access 2003 Runtime. There are two files I have compiled into a self-extracting zip file: ACCESSRT.CAB...
0
by: Mike | last post by:
Hi, I have an application in which I try to use the installer functions. An Installer (WindowsInstaller.Installer) object must be initially created to access the installer functions. If I use...
3
by: saxicek | last post by:
Hi, I'm trying to install Python on Windows 2000 Server using remote desktop. I log as a user that is in administrators group. Instalator starts, I select default installation directory, on the...
1
by: Rob R. Ainscough | last post by:
In the past for VS 2003 .NET 1.1 Windows Service projects, I've been using InstallUtil. I'm now converting it over to VS 2005 and .NET 2.0 and would like to create a stand alone installer --...
4
by: Rob R. Ainscough | last post by:
The task is brain dead simple - Uninstall prior Windows Service and Install newer version of Windows Service Background: 1. My Windows Service written in .NET 1.1 and deployed via MSI (Windows...
2
by: ashishjainism | last post by:
I am unable to install my windows service and the installutil is throwing the following error: Running a transacted installation. Beginning the Install phase of the installation. See the...
0
shahjapan
by: shahjapan | last post by:
Hello, I have developed a Windows based Application in .NET 2005. Now I need to make an Installer for it, in such a way that it must install in only 1 pc. using Registration key as I dont...
1
by: =?Utf-8?B?aGZkZXY=?= | last post by:
Hello, I have a web application that makes use of the SQL Membership and Role providers. My app has admin screens to manage users (membership), roles, and supplementary user data. I have just...
1
by: yogita1107 | last post by:
I have a setup project in Visual Studio 2008 with Custom Action class. I have to execute the msi on command line using msiexec /i SetupProject.msi /qb /l* out.txt command. The task is to write custom...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.