uninstall + -2147418113
Hi everybody,
I have a setup project made with installshield 11.5 a basic MSI Project.
When i install this setup i save some dll with a custom action and some script:
nResult = CopyFile (INSTALLDIR + "\\file.....");
and so on
now when i remove this project I MUST TO RESTORE THESE DLL !
i have a script who replace these dll but JUST ONE DLL is not replace and i have this error !!!
-2147418113 !
i think this error appears because the service is not stopped when i replace one dll !
i have place the custom actin in sequence number AFTER stopservice but that doesn't works !
In fact, i have a componenent associeted with control nt service !
that's work if a place this line iof my function restorefile :
ServiceStopService( szServiceName );
my dll is WELL replace !
Now here is it my questin and i hope to be clear :-) for you, where i place my custom action for to replace dll when i remove the project :
here is the settings for the customaction restorefile:
return processing : synchronous (check exit code)
in script execution :deferred execution in system context
install exec sequence : after installservice
install exe ccondition :REMOVE= "ALL"
What do you thing ! have you good any idea !?
Thanks you very much and sorry for my bad english !!!
Christophe
I have a setup project made with installshield 11.5 a basic MSI Project.
When i install this setup i save some dll with a custom action and some script:
nResult = CopyFile (INSTALLDIR + "\\file.....");
and so on
now when i remove this project I MUST TO RESTORE THESE DLL !
i have a script who replace these dll but JUST ONE DLL is not replace and i have this error !!!
-2147418113 !
i think this error appears because the service is not stopped when i replace one dll !
i have place the custom actin in sequence number AFTER stopservice but that doesn't works !
In fact, i have a componenent associeted with control nt service !
that's work if a place this line iof my function restorefile :
ServiceStopService( szServiceName );
my dll is WELL replace !
Now here is it my questin and i hope to be clear :-) for you, where i place my custom action for to replace dll when i remove the project :
here is the settings for the customaction restorefile:
return processing : synchronous (check exit code)
in script execution :deferred execution in system context
install exec sequence : after installservice
install exe ccondition :REMOVE= "ALL"
What do you thing ! have you good any idea !?
Thanks you very much and sorry for my bad english !!!
Christophe
0 Comments
[ + ] Show comments
Answers (5)
Please log in to answer
Posted by:
AngelD
17 years ago
Posted by:
christopheOce
17 years ago
Hi angelId?
The problem is ok now !
the problem was when i remove the product i do an action who restore some file !
but sometimes and i don't know why the service wasn't stop !
and then thet dll of the service failed of course !
for to correct this problem i do a while for to restore my dll and test the value of result of restore !
As this :
nResult = CopyFile (svPath + ".....
if(nResult == 0)then
MessageBox("Restore ok", INFORMATION);
else
while (VAL == 0)
nResult = SetFileInfo(svPath + "\\my.dll", FILE_ATTRIBUTE, FILE_ATTR_NORMAL, "");
nResult = CopyFile (svPath + "\\my.dll", INSTALLDIR + "my.dll");
Delay(1);
nCount = nCount + 1;
if(nResult == 0)then
VAL = 1;
endif;
endwhile;
NumToStr (displayNum, VAL);
MessageBox("Spin number : " + displayNum, INFORMATION);
endif;
Im not sure that the good idea but after several test that work !
what do you think ?
Thanks everybody
Christophe
The problem is ok now !
the problem was when i remove the product i do an action who restore some file !
but sometimes and i don't know why the service wasn't stop !
and then thet dll of the service failed of course !
for to correct this problem i do a while for to restore my dll and test the value of result of restore !
As this :
nResult = CopyFile (svPath + ".....
if(nResult == 0)then
MessageBox("Restore ok", INFORMATION);
else
while (VAL == 0)
nResult = SetFileInfo(svPath + "\\my.dll", FILE_ATTRIBUTE, FILE_ATTR_NORMAL, "");
nResult = CopyFile (svPath + "\\my.dll", INSTALLDIR + "my.dll");
Delay(1);
nCount = nCount + 1;
if(nResult == 0)then
VAL = 1;
endif;
endwhile;
NumToStr (displayNum, VAL);
MessageBox("Spin number : " + displayNum, INFORMATION);
endif;
Im not sure that the good idea but after several test that work !
what do you think ?
Thanks everybody
Christophe
Posted by:
AngelD
17 years ago
Posted by:
jmcfadyen
17 years ago
im not 100% sure of the entire question.
but when you are doing something like this that requires the reversal actions to be done you should use a commit / rollback action.
ie when installing you use a commit, when uninstalling you should use the rollback action.
These CA's are designed to be run as a pair.
I have posted today a graphical view of how the sequences are read on the Wise Package Studio forums under the topic of "Installation Sequences"
but when you are doing something like this that requires the reversal actions to be done you should use a commit / rollback action.
ie when installing you use a commit, when uninstalling you should use the rollback action.
These CA's are designed to be run as a pair.
I have posted today a graphical view of how the sequences are read on the Wise Package Studio forums under the topic of "Installation Sequences"
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.