Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   /SHORT form install path (http://forums.winamp.com/showthread.php?t=287234)

eezing 20th February 2008 01:29

/SHORT form install path
 
I'm trying to edit an .ini to point to a program install path. The trick is that I need the install path to be written in DOS short form. Below is the lines that I came up with. It will right the the install path to the .ini, however not in Dos Short form. Any ideas? Thanks.

GetFullPathName /SHORT "$R8" "$INSTDIR\CDROM\"

WriteINIStr "$WINDIR\Windows\GALSWIN.INI" "SYS" "CDROM" "$R8"

Afrow UK 20th February 2008 09:26

You may need to make sure $INSTDIR exists. GetShortPathName API does not specify this however.

Stu

eezing 20th February 2008 16:05

Well, $INSTDIR does exsist in the script and is working properly.

I'm a bit confused about "GetShortPathName"; this doesn't seem to be a valid command.

Further information would be of great help.

Thanks for the reply

Afrow UK 20th February 2008 16:13

I mean check the path exists. GetShortPathName is the API behind GetFullPathName /short (I am assuming anyway).

Stu

eezing 20th February 2008 17:16

Problem Resolved

GetFullPathName /SHORT "$R8" $INSTDIR

StrCpy $4 "$R8\CDROM\"

WriteINIStr "c:\Windows\GALSWIN.INI" "SYS" "CDROM" "$4"


All times are GMT. The time now is 04:28.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.