SvenBrnn
16th August 2011 14:07 UTC
CABSetup Problem
Hi,
i have a Problem with NSIS script Using CABSetup.
When i try to use the Inststub.exe included in the CABSetup package it always crashs after the Installation. Its installed right but the "Pseudo Crash" issnt good because People who install my Programm later will be Iritated. (The issue just happens on Win Vista+).
So i decited to write my own Inststub.exe. But it doesnt extract the *.cab File and always gives me the out "2" instad of "0".
InitPluginsDir
SetDetailsPrint None
File /oname=$PLUGINSDIR\SET1.RPT ${SOURCEPATH}SET1\SET1.RPT
SetDetailsPrint Both
CABSetup::Extract "/SOURCE=$SourcePathDATA01.CAB" "/TARGET=$INSTDIR" /ALL "/reportfile=$PLUGINSDIR\SET1.RPT" |
Pop $R0
I already gave out the $SourcePath and $PLUGINSDIR in a MessageBox and they where Correct. But it doesn't extract the Cab's when i use my own InstStub.
Does anyone have a Solution for my Problem?
MFG SvenBrnn
PS: Sry for my bad English
T.Slappy
17th August 2011 09:35 UTC
I did not tested that plugin but it looks like wrong unloading of plugin.
Maybe some destructor goes wrong or some memory exception is shown when dll exits...
SvenBrnn
23rd August 2011 10:08 UTC
The error doesnt come from the Installer. It comes from the stubinst.exe that runs the "real" installer.
Its a file that deletes the Installer and then Itself when the installation is done.
As i said, i tryed to make my own, that not crashes, but it doesnt work.
MFG Sven
T.Slappy
24th August 2011 08:47 UTC
I checked CabSetup by myself and this line is definitely wrong:
CABSetup::Extract "/SOURCE=$SourcePathDATA01.CAB" "/TARGET=$INSTDIR" /ALL ...
The correct variable is
${SOURCEPATH}\Data1.cab but you need to check what is REAL name of your .cab file.
In my case the name differed which caused error #2.
SvenBrnn
25th August 2011 15:34 UTC
CABSetup::Extract "/SOURCE=${SOURCEPATH}\DATA01.CAB" "/TARGET=$INSTDIR" /ALL "/reportfile=$PLUGINSDIR\SET1.RPT" |
Pop $R0
I checked the Path twice, but it doesnt work.
If i use the Original InstStub.exe it works, but when the file tryes to delete it self it crashs and give out an error.
If i use my own, it dont works.
T.Slappy
26th August 2011 06:58 UTC
Please attach whole solution, I will try to compile it on my PC.
SvenBrnn
31st August 2011 14:56 UTC
The compleet Solution is to big to attach it somewhere.
MFG Sven