Old 21st March 2005, 09:15   #1
Junior Member
Join Date: May 2003
Location: Barcelona, Spain
Posts: 14
Send a message via ICQ to mnavarro
$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

mnavarro is offline   Reply With Quote
Old 22nd March 2005, 19:31   #2
[NSIS Dev, Mod]
kichik's Avatar
Join Date: Oct 2001
Location: Israel
Posts: 11,343
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"

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 23rd March 2005, 17:57   #3
Junior Member
Join Date: Oct 2002
Posts: 46
"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."

mrtech is offline   Reply With Quote
Old 1st April 2005, 04:04   #4
Major Dude
Join Date: May 2003
Posts: 681

Greets, Brummelchen
Brummelchen is offline   Reply With Quote
Old 20th May 2005, 09:48   #5
Junior Member
Join Date: Sep 2003
Posts: 12

Why doesn't the installer use the envionment variable %WINDIR% instead of GetWindowsDirectory()?
a8os6i is offline   Reply With Quote
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump