Skip to content
⌘ NSIS Forum Archive

File fct error when from CD-R on WinNT

2 posts

jurddegc#

File fct error when from CD-R on WinNT

The following code:

SetOutPath "$PROFILE"
SetOverwrite on
File "..\mypath\myfile.ini"

Generates an error when the installer is run under WinNT SP6a from a CD-R! (Windows Error msg: "Error opening the file \myfile.ini in writing...")

The error disappears if I run it from the hard drive!

What's wrong?

Thanks!
pengyou#
From the NSIS Users Manual:
$PROFILE

The user's profile directory. A typical path is C:\Documents and Settings\Foo.

This constant is available on Windows 2000 and above.
I suspect $PROFILE will be empty if the OS is not "Windows 2000 and above"