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 !!!
0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


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"
Answered 03/15/2007 by: jmcfadyen
Fifth Degree Black Belt

Please log in to comment
What does a verbose log say during uninstall?
Is the failing DLL part of Windows File Protection?
Can you see if the DLL is in-use?
Could you solve this using PendingFileRenameOperations?
Answered 03/15/2007 by: AngelD
Red Belt

Please log in to comment
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);


while (VAL == 0)

nResult = SetFileInfo(svPath + "\\my.dll", FILE_ATTRIBUTE, FILE_ATTR_NORMAL, "");
nResult = CopyFile (svPath + "\\my.dll", INSTALLDIR + "my.dll");

nCount = nCount + 1;

if(nResult == 0)then
VAL = 1;


NumToStr (displayNum, VAL);
MessageBox("Spin number : " + displayNum, INFORMATION);


Im not sure that the good idea but after several test that work !

what do you think ?

Thanks everybody
Answered 03/16/2007 by: christopheOce
Senior Yellow Belt

Please log in to comment
There is no right or wrong, as long as it works I would stick with it.

Does the service run with a special account?
In that case the system may not have permission to stop/delete it and therefore fails.
Answered 03/16/2007 by: AngelD
Red Belt

Please log in to comment

thanks you for your reply !

Have a nice day
Answered 03/19/2007 by: christopheOce
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity