calumm
1st June 2005 18:40 UTC
File not uninstalled
I've got an uninstallation which isn't removing all the files.
The uninstallation part of my NSIS script has:
Delete "$INSTDIR\samples\Toolkit Test Suite\Tests\ExampleDefaultData.class"
Delete "$INSTDIR\samples\Toolkit Test Suite\Tests\ExampleDefaultData$ItemDataPair.class"
Delete "$INSTDIR\samples\Toolkit Test Suite\Tests\ExampleDefaultData$1.class"
along with various other files.
The ExampleDefaultData$1.class is not being removed by the uninstaller.
I'm guessing it's something to do with the "$1", but I've been unable to track it down.
Thanks for your help!
Calum
Pidgeot
1st June 2005 20:30 UTC
$1 is a token that represents a variable in NSIS. Since NSIS supports inline variables (like with $INSTDIR), $1 will be replaced by the contents of that variable.
To work around the issue, you can use a wildcard to delete. The safest would probably be to put a question mark in place of the $.
Instructor
2nd June 2005 08:42 UTC
If name of your file exactly "ExampleDefaultData$1.class":
Delete "$INSTDIR\samples\Toolkit Test Suite\Tests\ExampleDefaultData$$1.class"
calumm
2nd June 2005 09:36 UTC
Thanks.
I think this works.
When I previously tried it, I put it in for the installed file as well (File /a "...\ExampleDefaultData$$1.class"), but this didn't work.
Any reason why I need to do it for uninstalling, but not for installing?
Thanks,
Calum
Originally posted by Instructor
If name of your file exactly "ExampleDefaultData$1.class":
Delete "$INSTDIR\samples\Toolkit Test Suite\Tests\ExampleDefaultData$$1.class"
Instructor
2nd June 2005 09:44 UTC
File /a "ExampleDefaultData$1.class"
-It is compile time instruction, so there is no variables (only defines)
Delete "$INSTDIR\ExampleDefaultData$$1.class"
-It is run time instruction