Click here to Skip to main content
12,951,034 members (57,512 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi Friends,

Changing [TARGETDIR] in Installer Class...
Posted 30-Nov-12 21:22pm
JITHIL P PONNAN 1-Dec-12 4:28am
Is this a question or just some quotes?????

Please don't spoil this site's quality.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You shouldn't be doing that unless you have a damn good reason to do so. Changing the TARGETDIR at the wrong time during an installation can break your app installation AND make it impossible to uninstall.

You have to keep more than a few things in mind when doing this. You can't just assume your installer wil ever be used to do just an install. There are also Admin installations, Maintenance (Repair) installs, and Uninstalls. Changing the TARGETDIR for an Install doesn't necessarily mean that the same method you use for changing the TARGETDIR during install is going to get executed during the other uses for your installer.

Read this[^].

If you really are going to process to do this, DO NOT DO IT using the Setup project in Visual Studio. Use a professional installation package builder project, like InstallShield.

Oh! And another thing. You also have to consider the possibility that your app is being installed/maintained/uninstalled on a 64-bit machine where the Program Files folder can have a different name depending on the bitness of your installer/app.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,984
CHill60 3,460
Maciej Los 3,053
Jochen Arndt 1,975
ppolymorphe 1,820

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 1 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100