I very much doubt the read only flag will stop it being deleted. If the uninstaller is in use, then what I've said applies.
-Stu
uninstall.exe and an external way of patching
34 posts
Hi Stu,
Yes, you are right, so I started the uninst.exe with _?= param.
What I have noticed is that the following code works just fine:
But I would have expected also a return error code for the following code:
Thx,
Viv
Yes, you are right, so I started the uninst.exe with _?= param.
What I have noticed is that the following code works just fine:
meaning it returns 5 when the file is in use so Delete fails.
Section -Post
ClearErrors
Delete "$EXEDIR\${MY_UNINSTALLER_NAME}"
IfErrors done_err.Post
WriteUninstaller "$EXEDIR\${MY_UNINSTALLER_NAME}"
IfFileExists "$EXEDIR\${MY_UNINSTALLER_NAME}" done.Post 0
done_err.Post:
SetErrorLevel 5
done.Post:
SectionEnd
But I would have expected also a return error code for the following code:
as I would expect that b/c Delete fails, the running of this exe would return an error code, but actually it returns 0. Why is that?
Section -Post
ClearErrors
Delete "$EXEDIR\${MY_UNINSTALLER_NAME}"
WriteUninstaller "$EXEDIR\${MY_UNINSTALLER_NAME}"
IfFileExists "$EXEDIR\${MY_UNINSTALLER_NAME}" done.Post 0
done_err.Post:
SetErrorLevel 5
done.Post:
SectionEnd
Thx,
Viv
I don't think now that the error flag has anything to do with the error levels.
These are the error levels in the documentation:
0 - Normal execution (no error)
1 - Installation aborted by user (cancel button)
2 - Installation aborted by script
You need to set the error level yourself then like in your first example.
-Stu
These are the error levels in the documentation:
0 - Normal execution (no error)
1 - Installation aborted by user (cancel button)
2 - Installation aborted by script
You need to set the error level yourself then like in your first example.
-Stu
I don't think now that the error flag has anything to do with the error levels.Yes, this seems to be the case. I wasn't aware of that. I somehow was sure that it will return a value diff than 0 if one instruction fails.
Thx Stu,
Viv