Installation without registry, Add/remove program, shortcut

Got a problem you cannot solve? Try here.
Stephen Ibbs
Posts: 36
Joined: Thu Oct 26, 2006 5:44 am

Installation without registry, Add/remove program, shortcut

Postby Stephen Ibbs » Thu Oct 26, 2006 5:48 am

Once I have released an application I will often release maintenance updates.

I never know what version the customer is using so I intentionally avoid major/minor/patch updates because I would need so many to cater for all the different upgrade possibilities. Within the exe I include code to check versions, update tables, delete old files etc etc so it is all done on the fly.

I want to produce a tiny installation that would contain probably the main application exe and perhaps one or two support files. When this maintenance release installs I want it to simply overwrite the main exe and any other files, and obviously install any new files. I do NOT want it to put anything into the registry, shortcut folder, add/remove programs etc..

I can't see whether this is possible in IA and if it is possible, how to do it. I created a new project and copied the product code over from the original application project (different upgrade code) and when I installed the maintenance release it uninstalled all the original files. I tried with a new product code and a new upgrade code but it put an entry into the Add/Remove programs applet. I tried deleting the entries for Add-remove program, and deleting the Shortcut folder entry. I have not touched the Registry options page in any way in either project. There is nothing in the Shortcuts page.

Many thanks

Stephen

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Oct 26, 2006 9:33 am

Hi Stephen,

We already talked about this over email, but here is again my answer for the benefit of everyone else:

1) Add all new files as support files
2) Copy them directly into their target folders using Call DLL Function, CopyFileA in kernel32.dll, and the $SUPPORTDIR$ source path

OR

1) Use the Move Files command to install your new files
2) After Apply Install is called, call Apply Uninstall to remove the Add-Remove Entry for the new setup (this will not undo files that have been moved)

3) You will of course need to read the appropriate target path (the $TARGETDIR$ of the main install) from the registry or elsewhere
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

Stephen Ibbs
Posts: 36
Joined: Thu Oct 26, 2006 5:44 am

Postby Stephen Ibbs » Thu Oct 26, 2006 3:46 pm

Gulp - many thanks. I am a complete novice at this.

Any chance you could post a few lines of code illustrating the approaches you suggest. If I have something to work from I am fairly sure I can figure it out. I have looked at the help and it doesn't give an example of using each command with sample parameters.

Sincerely

Stephen

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Thu Oct 26, 2006 5:45 pm

Try this:

Code: Select all

Comment: First read the saved value of $TARGETDIR$. Must have been saved by the original setup.
Read Registry Key HKLM\\SOFTWARE\\My Company\\My Product\\Saved TargetDir into EXISTING_TARGETDIR
Comment: This implements approach #1
Call DLL Function kernel32.dll->CopyFileA
Comment: This implements approach #2
Copy Local Files $SUPPORTDIR$\\fileone.dat to $EXISTING_TARGETDIR$\\fileone.dat
Apply Install
Apply Uninstall


in paste-able form:

Code: Select all

~InstallAware Clipboard Data~
~Apply Changes~
~{F2110C18-45DE-4C26-8FB2-256F9F1F4442}~
~~
~~
~FALSE~
~TRUE~
~Apply Changes~
~{63431B53-DC48-431F-87D6-B59FEFA88137}~
~~
~~
~TRUE~
~FALSE~
~Copy/Move Local Files~
~{D9CCA636-1A98-4292-B14D-D4B0D5DA2B50}~
~$SUPPORTDIR$~
~fileone.dat~
~$EXISTING_TARGETDIR$~
~fileone.dat~
~TRUE~
~FALSE~
~Comment~
~{549A9A58-6A0A-49AA-9EE5-2B5D431A2F93}~
~This implements approach #2~
~Call DLL Function~
~{A3909E8A-1B06-4845-B903-9352E1C8A407}~
~kernel32.dll,CopyFileA,bool,,"pointer to string",$SUPPORTDIR$\\fileone.dat,"pointer to string",$EXISTING_TARGETDIR$\\fileone.dat,bool,FALSE,$~
~mIDEFunc.dll\\mEXEFunc.dll~
~Comment~
~{E2E2F1D7-EEEE-4414-BC3A-92449742701B}~
~This implements approach #1~
~Read Registry~
~{58BFC185-58F8-440D-B94C-CA71683735FE}~
~EXISTING_TARGETDIR~
~2~
~SOFTWARE\\My Company\\My Product~
~Saved TargetDir~
~Comment~
~{6EC2782A-08BC-4628-9009-6012EADDA1E0}~
~First read the saved value of $TARGETDIR$. Must have been saved by the original setup.~
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 36 guests