Re: Access denied fro GetShortPathName in Windows Vista

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi tuma,

Thanks. It works. But I am very curious to know why the “Access
Denied” error when I hard code the path.

Compare your hard coded path and the path returned from
CSIDL_LOCAL_APPDATA. They are not identical, right?
Vista uses hard links to "support" the old (pre-Vista) directory
names in a limited way. Those hard links have a different
default security compared with what you get through the
above CSIDL. That might bight you.

In short: never use hard coded paths as different Windows
versions and languages will have slightly varying paths.

--
SvenC

.



Relevant Pages

  • Re: best way to sych a mirror SATA drive to RIAD array
    ... Soft links (which NTFS and windows do not support at all) are in many ways much more useful - and are therefore much more used. ... Hard links are extremely useful for backups in they way you describe - the combination "rsync && cp -al" is the basis of several backup utilities such as rsnapshot and dirvish. ...
    (comp.os.linux.misc)
  • Re: Copying NTFS Hard Links and Junctions to and from CD/DVD
    ... I see that both Windows 2000 and XP support ... reading from disks formatted with the UDF file system, ... now I'm wondering if there are any Windows ... CD/DVD writing apps out there which actually support creating hard links ...
    (microsoft.public.win2000.file_system)
  • Re: Writing UDF Formatted Disks with Hard Links and Symbolic Links
    ... but I thought Microsoft planned to implement support ... Rainier into newer Microsoft operating systems. ... In WinXP and Windows Server 2003, FSUTIL will create hard links. ...
    (microsoft.public.win2000.file_system)
  • Re: Copying NTFS Hard Links and Junctions to and from CD/DVD
    ... > available in Windows. ... > symbolic link support is planned for any Windows release in the ... Given the fact that NTFS already supports hard links and junctions, ... > truly an exact replica of any native OS hard disk file system. ...
    (microsoft.public.win2000.file_system)
  • Re: Deleting alias files (blocks deleted)
    ... >these requirements without raising the interesting issues that hard links ... VMS supports the traditional aliases, ... UNIX style symbolic links, (also with support for NFS), which are very new ... remaining alias. ...
    (comp.os.vms)