eezing
20th February 2008 02:29 UTC
/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 10:26 UTC
You may need to make sure $INSTDIR exists. GetShortPathName API does not specify this however.
Stu
eezing
20th February 2008 17:05 UTC
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 17:13 UTC
I mean check the path exists. GetShortPathName is the API behind GetFullPathName /short (I am assuming anyway).
Stu
eezing
20th February 2008 18:16 UTC
Problem Resolved
GetFullPathName /SHORT "$R8" $INSTDIR
StrCpy $4 "$R8\CDROM\"
WriteINIStr "c:\Windows\GALSWIN.INI" "SYS" "CDROM" "$4"