Archive: Need help with script!


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?

Installer:
http://www.pawsoft.btinternet.co.uk/...lock_beta3.exe

NSIS Script:
http://www.pawsoft.btinternet.co.uk/temp/pawclock.nsi

Any help would be greatly appreciated!


How does NSIS handle not having administrative privs to a system?


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.


Update
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:
http://www.pawsoft.btinternet.co.uk/...setupwin95.gif

http://www.pawsoft.btinternet.co.uk/...setupwinME.gif

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.


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.

Any ideas?


AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHH!

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.


sorry bout that.. I suck :)


No problem Justin!


:) I'll try to keep it to a minimum. Anybody have any problems with 1.4? :)


Well obviously I don't at the moment or I would have told you.