Question

I want to make installer that copies and register (regsvr32) a.dll

When installer failed to overwrite a.dll, (because in-use, ... etc) I want to copy a.dll as a0.dll and register it.

Can I do that with NSIS?

Was it helpful?

Solution

Below code should do it.

section ""
File a.dll
execwait "Regsvr32 /s a.dll"
IfErrors 0 noError
Rename a.dll a0.dll
execwait "Regsvr32 /s a0.dll"
noError:
sectionEnd
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top