View Full Version : Need help with script!
28th April 2001, 12:41
I have a problem that just won't go away. On some systems, my installer fails to create the directory when doing a SetOutPath and then of course fails to install the files. It also seems to fail creating shortcuts as well.
The only system I know for sure to have this behaviour right now is running Windows 2000, which I do not have so cannot test myself.
Could you please download my installer and script and help me out with it?
Any help would be greatly appreciated!
28th April 2001, 13:47
How does NSIS handle not having administrative privs to a system?
28th April 2001, 14:53
Are you using SetOutPath on a directory whose parent directory hasn't been created yet? I'm not sure, but this could be a problem.
28th April 2001, 15:55
It is definetely not limited to Windows 2000, as another person just mailed me and had problems in Windows 95. Also in Win ME, although just the createshortcut problem there.
Here are the screenshots I was sent:
So far I have not been able to reproduce any of these problems on my Win ME system. This is all very frustrating.
I'll look into that parent directory thing rainwater. Don't think it is that though.
28th April 2001, 17:31
I have finally found out what is going on here (it looks like rainwater was right). If you look at my script you will notice the default install locations is "$PROGRAMFILES\PAWSoft\PAWClock" and the default start menu location is "$SMPROGRAMS\PAWSoft\PAWClock".
I have been focusing on deleting the PAWClock directory for my tests, without ever considering the PAWSoft directory. I have now tried renaming my PAWSoft directory (both in Program Files and the Start Menu) and reproduced the same errors as shown in the above screenshots.
So what is happening? NSIS appears to be failing to recursively create the necessary directories. From the NSIS documentation on SetOutPath:
"Note that it recursively creates it, so if you create C:\poop\dir2\dir3, it will create all that it needs to."
For some reason in my case this is not happening, as it will only work if the PAWSoft directory is already present. I have tried CreateDirectory as well but this doesn't make any difference.
The problem is how do I fix it? I cannot create the PAWSoft directory first because the user might not have selected the default installation location.
28th April 2001, 17:40
Sorry about that, but I just found out why it wasn't working. It was a bug in NSIS 1.3 (the version I was using). Even though I had glanced through the version 1.4 Beta 1/2 changes several times I didn't (until a moment ago) notice the bit about fixing the recursive create directory.
This is typical. Previously when something went wrong I would upgrade to the latest NSIS hoping that the problem I had created would be fixed. Of course it never was, because it was my script at fault. This time I didn't do that thinking that it was my script when in fact there really was a bug with NSIS 1.3.
Very annoying, but at least it is worked out now.
29th April 2001, 06:30
sorry bout that.. I suck :)
29th April 2001, 13:34
No problem Justin!
30th April 2001, 05:29
:) I'll try to keep it to a minimum. Anybody have any problems with 1.4? :)
30th April 2001, 12:16
Well obviously I don't at the moment or I would have told you.
vBulletin® v3.8.6, Copyright ©2000-2013, Jelsoft Enterprises Ltd.