Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Uninstall problem in Installscript MSI project.


4 replies to this topic

Shekhar

Shekhar
  • Members
  • 30 posts

Posted 29 June 2006 - 16:03

HI ,
i am facing one problem while uninstallation the product.

After successfully installation of product, If I change the computer name (Network identification) then I am facing the problem while uninstalling the product. In fact I am unable to remove the product form that host machine. wacko.gif

Can anybody tell me why it is so? Is there any dependency on hostname?

Any help regarding this problem is highly appreciated.

Thanks,
Shekhar


Shekhar

Shekhar
  • Members
  • 30 posts

Posted 07 August 2006 - 12:24

I have investigated this problem and this is the reason for error...
I am installing some component using the network path (\\hostname\sharename). so while removing the product, windows installer validate individual components installation path. So after changing hostname, the path validation failed at beginning of the uninstallation. This results in fatal error and aborts the uninstallation process.

I have to install those component files in network share folder. Because of this I am using network path while installation. Now my client doesn’t want this hostname dependency ... so how can I fix this?

is there any method stop logging of windows installer while installing any perticular component.
Or
Any other method with which we can install the files and make available across the network.

Please help me... sad.gif

Thanks

shekhar


MrSmersh

MrSmersh
  • Full Members
  • 48 posts

Posted 07 August 2006 - 16:03

The logging part is simple Disable(LOGGING)…

To do it just for some files you should install them explicitly between a Disable and Enable.

Something like this (it is not nice but it works)

if(!Disable(LOGGING))
then
nRez= XCopyFile ("your net full path\\XXX.yyy", "",COMP_NORMAL|LOCKEDFILE);
if(nRez<0)
then
szMsg = “ErrCopying” +" XXX.yyy ";
MessageBox (szMsg, WARNING);
nFinalRez=-1;
endif;

if(Enable(LOGGING)<0)
then
nFinalRez=-1;
endif;
endif;

If you are talking components/features in between Enable Disable should be the moving functions.

Anyhow take care to remove this files at uninstall because it will not be done automatically (since are not in the log).

If you have more questions, ask!

Shekhar

Shekhar
  • Members
  • 30 posts

Posted 08 August 2006 - 07:33

Hi MrSmersh,

Thanks for the help. Actually I was aware of the method you have suggested. One thing I have to mention that the file copying is done by windows installer. I mean I have just mentioned the target path for each component. Rest of the thing windows installer handled. So in short no script has been used while copying these components files.

I want to know how we can stop logging while copying these components.

Second way I could see here is that use xcopy function as you suggested for copying those files. But the files are in .CAB (zipped) file. Is there any way to read .CAB files and copy them to target system using xcopy function? . In that case the solution you have suggested is absolutely fit.

Please let me know if you have some idea about this.
Thanks in advance
Shekhar



MrSmersh

MrSmersh
  • Full Members
  • 48 posts

Posted 08 August 2006 - 11:07

Could you put here the code you use now? And highlight what are the offending components.

The usual way to move and install components/features is FeatureMoveData. So this call for the offending components should be put in-between Disable and Enable.