mnavarro
21st March 2005 10:15 UTC
$WINDIR in Windows 2003 Server
I am trying my installer in a Windows 2003 Server and I have noticed that the installer resolves $WINDIR to c:\documents and settings\myUser\WINDOWS instead of c:\WINDOWS. The windir environment variable is set to c:\WINDOWS.
Have anybody else noticed this problem?
I am using NSIS 2.06
Thanks
kichik
22nd March 2005 20:31 UTC
That's normal Windows 2003 and terminal services behavior. I don't remember the exact reason, but that's the way it works. There is probably some information about this in MSDN. If you want to get the system Windows directory, you can call GetSystemWindowsDirectory using the System plug-in:
System::Call 'kernel32::GetSystemWindowsDirectory(t .r0, i ${NSIS_MAX_STRLEN})'
DetailPrint "Windows Directory: $0"
mrtech
23rd March 2005 18:57 UTC
"On a system that is running Terminal Server, each user has a unique Windows directory. The system Windows directory is shared by all users, so it is the directory where an application should store initialization and help files that apply to all users.
With Terminal Services, the GetSystemWindowsDirectory function retrieves the path of the system Windows directory, while the GetWindowsDirectory function retrieves the path of a Windows directory that is private for each user. On a single-user system, GetSystemWindowsDirectory is the same as GetWindowsDirectory."
http://msdn.microsoft.com/library/de...sdirectory.asp
Brummelchen
1st April 2005 04:04 UTC
thx
a8os6i
20th May 2005 10:48 UTC
Why doesn't the installer use the envionment variable %WINDIR% instead of GetWindowsDirectory()?