dcbrewster
19th May 2010 19:57 UTC
Extra File Being Created
I have an extra file being created when executing my install script. The file created is empty and has a name which is 3 numbers and without an extension. Each time the script is executed a different file name is created. The script has 3 sections which the user can install. The extra file is always created in the first of the sections selected by the user. The extra file doesn't create any problems...it's just a pain. Any ideas?
Wizou
19th May 2010 21:48 UTC
obviously, it's not a file from the NSIS system itself, so it must be some part of your script..
try removing parts of your scripts until you identify which part creates this file..
Afrow UK
19th May 2010 21:55 UTC
Are you using ExecDos or any other plugins which have logging? Arguments are passed to plugins via the stack so it is important that you always give plugins the exact number of arguments otherwise the plugin will read the missing arguments from the stack. Hence if you have any (random) data on the stack it will be used by the plugin (in this case as a log file name by the looks).
For example, a minimal ExecDos::Exec call should be:
ExecDos::Exec `"some_command_line" args` `` ``
The first `` is for stdin_string and the second ``is for log_file_name so if you are using neither you must specify `` ``.
Stu
dcbrewster
19th May 2010 23:40 UTC
Found the problem. The InetLoad::load command was creating the extra file. Modified the command and the problem went away. There is no doubt that InetLoad has the weirdest syntax.
Afrow UK
20th May 2010 15:50 UTC
Syntax looks OK to me. You can't really expect that much more from plugins as they use the stack (except maybe combining switches with arguments using a = or :). Note the /END switch specific to InetLoad/InetC (among others) which prevents the plugin reading further from the stack. By the way, takhir made the InetC plugin which supersedes InetLoad. It may be worth using that instead.
Stu