Click here to Skip to main content
15,916,463 members
Home / Discussions / System Admin
   

System Admin

 
GeneralRe: Windows XP admin user locks himself out Pin
neualex29-Oct-07 12:29
neualex29-Oct-07 12:29 
GeneralRe: Windows XP admin user locks himself out Pin
Dave Kreskowiak29-Oct-07 13:24
mveDave Kreskowiak29-Oct-07 13:24 
GeneralRe: Windows XP admin user locks himself out Pin
neualex29-Oct-07 18:05
neualex29-Oct-07 18:05 
GeneralRe: Windows XP admin user locks himself out Pin
Dave Kreskowiak30-Oct-07 2:20
mveDave Kreskowiak30-Oct-07 2:20 
GeneralRe: Windows XP admin user locks himself out Pin
neualex30-Oct-07 17:15
neualex30-Oct-07 17:15 
GeneralRe: Windows XP admin user locks himself out Pin
Dave Kreskowiak30-Oct-07 18:00
mveDave Kreskowiak30-Oct-07 18:00 
QuestionI'm getting duplicate entries in Add/Remove Programs Pin
chaiguy133729-Oct-07 4:40
chaiguy133729-Oct-07 4:40 
AnswerRe: I'm getting duplicate entries in Add/Remove Programs Pin
Mike Dimmick29-Oct-07 11:34
Mike Dimmick29-Oct-07 11:34 
They should both be able to be uninstalled. Windows Installer reference counts installed components and does not remove files until they are no longer referenced by any installed product. It tracks installed components on a per-directory basis - it can cope with the same component being installed in multiple directories and removes each separate install location when that location is no longer referenced. (It doesn't actually count - it records which products have installed which components in which directory).

Note that file versioning rules exist. If a file has a version number in its resources (typically only EXEs and DLLs), the file with the greater version number wins. If only the new file has a version number, that will overwrite an existing file without a version. If neither file has a version number, the incoming file always overwrites the existing one, unless it has been edited (its modified timestamp is different from its creation timestamp - Windows Installer sets the creation timestamp and modified timestamp the same when installing the file). Registry entries are always overwritten. The net effect is that when you uninstall the new product, the newer files are actually left behind, you are not prompted to reinstall or repair the old one.

You can get into trouble if you have multiple components which install the same file to the same location, because Windows Installer will no longer have accurate reference counts. See Rob Mensching's (creator of WiX) blog post "Component Rules 101"[^] for more on this. However, if you're merely modifying the same installer project, Visual Studio will keep the same component identifier GUIDs for the same files (this may not be correct, if your resources are not in fact compatible across multiple versions, and VS has no way to allow you to change a GUID, except by removing and replacing the file).

Changing the Product Code is absolutely correct for a major upgrade. Visual Studio does not offer much assistance for minor upgrades, so you should really stick to major upgrades. You should always change the Package Code for any new build of your package.

Windows Installer detects families of products using the Upgrade Code. This GUID should be kept the same across all versions of your product until you want to break the family association. Windows Installer itself supports detecting any number of Upgrade Codes, optionally removing them before or after installing the new product, but Visual Studio does not allow them to be specified, specifying only the UpgradeCode from the current package.

In VS, you control what happens using the RemovePreviousVersions and DetectNewerInstalledVersion properties. You cannot choose when the RemoveExistingProducts action is scheduled; it's always scheduled after InstallInitialize. That means that if the new installer fails, the old product is reinstalled, and the old components are removed before adding the new ones. This is a pretty safe choice.

You've probably either changed the UpgradeCode or one of those two properties. I would leave them both set to True unless you really want side-by-side installations.

Windows Installer is much more complicated than it initially seems and in my opinion, has no business in a dumbed-down developer tool like Visual Studio. At least, not in this dumbed-down form. If you're going to use it I strongly recommend getting the book "The Definitive Guide to Windows Installer" by Phil Wilson, from Apress.


DoEvents: Generating unexpected recursion since 1991

GeneralRe: I'm getting duplicate entries in Add/Remove Programs Pin
chaiguy133729-Oct-07 11:58
chaiguy133729-Oct-07 11:58 
QuestionHow to get file size ? Pin
bug_aonz28-Oct-07 23:28
bug_aonz28-Oct-07 23:28 
AnswerRe: How to get file size ? Pin
Paul Conrad3-Nov-07 5:41
professionalPaul Conrad3-Nov-07 5:41 
QuestionPowershell Pin
Jerry Hammond28-Oct-07 18:31
Jerry Hammond28-Oct-07 18:31 
AnswerRe: Powershell Pin
Vasudevan Deepak Kumar29-Oct-07 1:08
Vasudevan Deepak Kumar29-Oct-07 1:08 
GeneralRe: Powershell Pin
Jerry Hammond29-Oct-07 3:05
Jerry Hammond29-Oct-07 3:05 
AnswerRe: Powershell Pin
Mike Dimmick29-Oct-07 2:20
Mike Dimmick29-Oct-07 2:20 
Questionwhat is an API?? Pin
Sivaprasad C26-Oct-07 1:25
Sivaprasad C26-Oct-07 1:25 
AnswerRe: what is an API?? Pin
Jerry Hammond26-Oct-07 2:45
Jerry Hammond26-Oct-07 2:45 
QuestionHow to get rid of the boot menu? Pin
ed welch25-Oct-07 9:14
ed welch25-Oct-07 9:14 
AnswerRe: How to get rid of the boot menu? Pin
JudyL_MD25-Oct-07 9:18
JudyL_MD25-Oct-07 9:18 
GeneralRe: How to get rid of the boot menu? Pin
ed welch26-Oct-07 1:02
ed welch26-Oct-07 1:02 
GeneralRe: How to get rid of the boot menu? Pin
Hesbon Ongira26-Oct-07 2:41
Hesbon Ongira26-Oct-07 2:41 
AnswerRe: How to get rid of the boot menu? Pin
Paul Conrad28-Oct-07 7:45
professionalPaul Conrad28-Oct-07 7:45 
GeneralRe: How to get rid of the boot menu? Pin
User 171649228-Oct-07 8:34
professionalUser 171649228-Oct-07 8:34 
GeneralRe: How to get rid of the boot menu? Pin
Mike Dimmick29-Oct-07 2:26
Mike Dimmick29-Oct-07 2:26 
QuestionMS-DOS programming Pin
akhshay gandhi24-Oct-07 18:31
akhshay gandhi24-Oct-07 18:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.