Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 2nd September 2004, 16:08   #1
Venu
Junior Member
 
Join Date: Sep 2004
Location: England
Posts: 48
How to get the Windows System directory

Hi all,

My problem goes like this...
I am using windows system call to get the current windows 'System directory' and current windows 'Windows directory'. The code I am using is as below:

..........
System::Call 'kernel32::GetSystemDirectoryA(t .r0, *i r1r1) i .r2'
Strcpy $SysFolderLocation $0
MessageBox MB_OK $SysFolderLocation

System::Call 'kernel32::GetWindowsDirectoryA(t .r0, *i r1r1) i .r2'
Strcpy $SysFolderLocation $0
MessageBox MB_OK $SysFolderLocation
.........

But the problem is when I am running this code in Win2K and WinXP, its working fine, but its not working in case of Win98SE and WinME.

Can anyone give me the solution for this. Or is there any other way to get the current 'windows' and 'system' directory, which will work on all OS.

Regards
Venu
Venu is offline   Reply With Quote
Old 2nd September 2004, 16:27   #2
pengyou
Major Dude
 
Join Date: Mar 2003
Posts: 569
Try reading the NSIS User Manual

http://nsis.sourceforge.net/Docs/Chapter4.html#4.2.3

Look for $WINDIR and $SYSDIR in Section 4.2.3
pengyou is offline   Reply With Quote
Old 3rd September 2004, 03:43   #3
Venu
Junior Member
 
Join Date: Sep 2004
Location: England
Posts: 48
Thank u very much....

I got the solution.

Regards
Venu
Venu is offline   Reply With Quote
Reply
Go Back   Winamp 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