ve6raj
21st January 2003 06:12 UTC
Error copying file sometimes when installing
Hello All:
Not exactly a NSIS problem, but I hope someone can help. I have an install script that works pretty well 90% of the time. On the odd machine I will get this error, usually for 10 to 15 files saying that there is an error copying the file. "Cannot create <filename>: Access is denied. make sure disk is not full or write-protected and that the file is not currently in use." I click on the OK button for the 10 or 15 times that the error is generated, then the rest of the installation continues normally. After installation the files are where they are supposed to be and evrything works OK. It is just annoying to get these error messages on some machines. On most of the machines the install script works flawlessly.
Thanks in advance
Raj
virtlink
21st January 2003 14:39 UTC
In order to find the error, please post your script here at the NSIS forum. KiCHiK, I, or someone else will look at it then and eventually fix any bugs in the script and/or NSIS if it are NSIS bugs. It's a possible bug caused by Windows.
ve6raj
27th January 2003 00:06 UTC
Hello and thanks for your reply:
I would appreciate it if you could shed any light on my problem.
Here is the script:
[edit by kichik]Please do not include large scripts but attach them, especially not HUGE scripts (attached below...)[/edit]
rainwater
27th January 2003 01:22 UTC
First thing I see is that you assume the user has a C drive. Not a good idea.
ve6raj
27th January 2003 02:38 UTC
Yes, it is part of the hardware spec. They all have a drive C:
deguix
27th January 2003 05:18 UTC
CreateDirectory "C:\MB2KS"
CreateDirectory "C:\MB2KS\A"
...
You should to use $INSTDIR in "C:\MB2KS", because when the user enter the Install Dir, almost don't have any effect.
Yes, it is part of the hardware spec. They all have a drive C:
But someone will want to install in drive D (if have two hard disk or two partitions of the hard disk). You can detect drive letter by using:
StrCpy ***91;var***93; "$INSTDIR" 1
>
When [var] is a output variable ($1, $2...).
This can be useful for the dir "C:\MBWIN".
!define VER_MAJOR 8.
!define VER_MINOR 03
You should to delete this dot for the version. You use this dot in other time.
kichik
27th January 2003 11:12 UTC
.
cvx_borg
8th May 2003 09:23 UTC
Originally posted by deguix
You can detect drive letter by using:
StrCpy ***91;var***93; "$INSTDIR" 1
>
When [var] is a output variable ($1, $2...).
This can be useful for the dir "C:\MBWIN".
but we should keep in mind that it can result in a "\" as well, for a \\thiscomputer\thisshare\ unc path.
kichik
8th May 2003 16:05 UTC
That's right. You can use this function, GetRoot, that I have just created.