|
|
|
|
#1 | |
|
Junior Member
Join Date: Feb 2015
Posts: 25
|
$InstDir with GetFullPathName /SHORT question
I am at a bit of a loss here. I have the following code:
Quote:
|
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
Empty string indicates that GetFullPathName has failed. You're probably trying to get a short path for a dir that hasn't been created yet.
PostEnd: |
|
|
|
|
|
#3 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,442
|
Short paths should only be used for compatibility with 16-bit programs and buggy applications. Short name generation can be turned off so not every filename will have one...
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#4 |
|
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
You can check for NtfsDisable8dot3NameCreation. It doesn't tell you the state at the time an existing dir was created but it can tell you whether you'll be able to create new short paths. It should only be used when it can't be avoided, that much is for sure.
PostEnd: |
|
|
|
|
|
#5 | |
|
Junior Member
Join Date: Feb 2015
Posts: 25
|
Quote:
As you can see from what my main goal is above, it is unavoidable. After a bit of investigation, under windows 7 "NtfsDisable8dot3NameCreation" is a volume based setting. I have looked at it and it is on for the volume in question. As for your earlier idea about it being a directory that has not been created at that point in time, I will have to investigate that further. Last edited by coderwolf; 3rd March 2015 at 12:49. Reason: Missed multi-qouting |
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
|
I tried Kernel32::GetVolumeInformation but it always returns 255 for lpMaximumComponentLength, regardless of reg entry. It just tells you if FS supports long names, not if Windows is creating short names, so that's useless. In the end, GetFullPathName /SHORT is as good a check as any. If it fails and you're sure it's an existing path, it means 8.3 creation is disabled. At that point there's not much you can do but inform the user.
PostEnd: Last edited by aerDNA; 3rd March 2015 at 15:55. |
|
|
|
|
|
#7 |
|
Junior Member
Join Date: Feb 2015
Posts: 25
|
It appears that the Directory was not created and that was the issue. I added a line before I ran the /short line. After I did that the returned variable was not blank. This is an internally used install file, so I believe I can trust that the machines will have a standard configuration with C drive set to support 8.3 filename format, so I am going to just give it a very basic ${If} Short_Path == "" -> MessageBox structure (as I am not proficient enough with this installer to get that deep atm).
|
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Feb 2015
Posts: 25
|
If the path is not set, is there a command to auto "rollback" the installation steps done at that point. Or is my only option to code a rollback using a step by step code at that point?
|
|
|
|
|
|
#9 |
|
Junior Member
Join Date: Feb 2015
Posts: 25
|
nm. Sorry, I broke a forum rule. I did not search.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|