Old 19th May 2009, 07:02   #1
ghkumarmvk
Junior Member
 
Join Date: May 2009
Posts: 1
drive of windows installed

sir,
anybody have the code of getting the drive name (eg: C:\, D:\) where windows installed for a nsis file? . i created a setup program to install my program using nsis. now i coded C:\ or D:\ directly on the code, but i want the setup program to check whether the windows installed on C:\ or D:\ and that drive letter shown in setup program to install .
any help??
with regards
G.H.Kumar
ghkumarmvk is offline   Reply With Quote
Old 19th May 2009, 11:44   #2
Animaether
Major Dude
 
Join Date: Jun 2001
Posts: 1,173
you could just make use of e.g. $SYSDIR (the full path to the system32 folder, which I think you can't change from the windows installation drive's; unless you did some major hacking after install, I suppose), and then just grab the drive from that using string manipulation.
Animaether is offline   Reply With Quote
Old 21st May 2009, 19:11   #3
qwertymodo
Junior Member
 
Join Date: Sep 2008
Posts: 26
Send a message via Yahoo to qwertymodo
StrCpy $YourVar "$SYSDIR" 3

This will give you C:\

Change the number to change the number of characters (i.e. 1-C, 2-C:, 3-C:\, etc)
qwertymodo is offline   Reply With Quote
Old 22nd May 2009, 04:17   #4
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
code:
ReadEnvStr $0 SYSTEMDRIVE
messagebox mb_ok "$0"


Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Reply
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