Windows 7 (32-bit)
I have an application that requires short path syntax for a sub-directory under Program Files (c:\Program Files\Foo Example\Foo Example2).
On MOST of my user systems, it's enabled by default and working fine. However on a select sub-set of users, it's disabled (I'm not sure why since everyone uses a common image).
I've tried enabling it via fsutil 8dot3name set 0
(from command-prompt using admin privileges). That command seems to run fine (no error). But when I try actually creating the short name I get:
C:\>fsutil file setshortname "Program Files" PROGRA~1
Error: Access is denied.
Any thoughts on how to debug this and determine why Windows won't let me add this? Is there an error log I can check somewhere?
Update
As per request, here's what I see when typing DIR P* /X
C:\>DIR P* /X
Volume in drive C has no label.
Volume Serial Number is XXXX-XXXX
Directory of C:\
07/13/2009 10:20 PM <DIR> PerfLogs
03/13/2014 02:47 PM <DIR> Program Files
03/13/2014 02:48 PM <DIR> Program Files (x86)
0 File(s) 0 bytes
3 Dir(s) 412,723,027,968 bytes free
Best Answer
You don't need to create the short name; it's already there.
To verify that it's "PROGRA~1" or determine what it is, use the DIR command, i.e.
which will show you the short names associated with each top-level folder name beginning with "P".
Since "Program Files" and "Program Files (X86)" are protected locations, the system is not going to let you change the short name associated with those folders, but there's no reason you can't use the short names already defined by the system itself.
In addition, your command is for files, and you are managing directories (which in a sense are files, but not to FSUTIL.)