473,799 Members | 3,033 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create initial installer and upgrade installer?

4 New Member
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 RemovePreviousV ersion 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
6 2055
Paul Johnson
97 New Member
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
Raymond Wee
4 New Member
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
Paul Johnson
97 New Member
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
Raymond Wee
4 New Member
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
Paul Johnson
97 New Member
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
Raymond Wee
4 New Member
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
1541
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 msisnk.dll has a strong name, I connot use this command anymore to create a instance of the object installer : objInstaller = createobject("msisnk.Installer") (i recieve a "cannot create AtiveX component..") And when I tried to use the VB.NET way...
2
5887
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 ACCESSRT.MSI Of course, if the user extracts the files and then double clicks on
0
3695
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 the CreateObject function to create a new instance of Installer I will have no problem (see a code below). However, I am wondering about is if it is possable to create a new Installer object without using CreateObject? Dim msiInstaller As...
3
1375
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 next screen with parts to install I click just next. Than blicks screen with progress bar but it is immediately replaced with screen informing that installation failed. But there's no information why or what is wrong. On remote connection I use 16...
1
1979
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 -- should I use the Setup Project template in VS 2005? Can this handle Windows Service installs? thanks, Rob.
4
2007
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 Installer) 2. My Windows Service is upgraded to .NET 2.0 with deployment project using MSI (Windows Installer) Upgrade code is the same from the .NET 1.1 version to the .NET 2.0 version
2
12850
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 contents of the log file for the d:\practice in .net\mywindowsservice\mywindowsservice\mywindowsservice\bin\practiceservice.exe assembly's progress. The file is located at d:\practice in...
0
1000
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 want it to be a Free Product. How to make the installer which requires a Regstration key and Registration name in order to install the Product.
1
2949
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 deployed the application to a production server. My Question: How do I create the initial Admin role and user in the clean/unpopulated database that has the Membership and Role schema on this production server?
1
4173
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 messages to the log file. This can be done by MsiProcessMessage function from Windows Installer API. To achieve this I have downloaded the C# wrapper class posted on CodeProject.com (http://www.codeproject.com/csharp/msiinterop.asp) that provides a...
0
9544
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10259
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10238
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4145
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.