mrjohn
5th October 2012 08:29 UTC
Why $PLUGINSDIR = DRIVE C: ?
Hi,I read that is better to use $PLUGINSDIR instead of $TEMP
In documentation is written :
$PLUGINSDIR
The path to a temporary folder created upon the first usage of a plug-in or a call to InitPluginsDir. This folder is automatically deleted when the installer exits. This makes this folder the ideal folder to hold INI files for InstallOptions, bitmaps for the splash plug-in, or any other file that a plug-in needs to work
So I've made a test for a .reg file
Section ""
SetOutPath $PLUGINSDIR
File my1
.reg
SectionEnd
>
But after install,I see my1.reg dropped directly on drive C:,not even deleted after install ?
There is something I miss there ?
Tested on XP SP3 (32)
Thanks !
MSG
5th October 2012 08:38 UTC
$PLUGINSDIR is a writable variable, perhaps you're changing it yourself?
Try a MessageBox MB_OK "$PLUGINSDIR" in your .onInit.
mrjohn
5th October 2012 08:47 UTC
No I didn't change it,this is whole script :
Name "Example1"
>OutFile "example1.exe"
>InstallDir $desktop
RequestExecutionLevel user
Page directory
Page instfiles
Section ""
SetOutPath "$PLUGINSDIR"
File my1.reg
SectionEnd
>
This :
onInit
MessageBox MB_OK "$PLUGINSDIR"
>FunctionEnd
>
give me an empy messagebox :
http://imageshack.us/a/img145/6463/98123881.jpg
Thanks!
Originally posted by MSG
$PLUGINSDIR is a writable variable, perhaps you're changing it yourself?
Try a MessageBox MB_OK "$PLUGINSDIR" in your .onInit.
Afrow UK
5th October 2012 10:09 UTC
InitPluginsDir.
Stu
mrjohn
5th October 2012 11:33 UTC
Great,it is working now !
Thanks !
Originally posted by Afrow UK
InitPluginsDir.
Stu