Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista File Management > Can't save file in localized folder

Reply
Thread Tools Display Modes

Can't save file in localized folder

 
 
Carl
Guest
Posts: n/a

 
      08-02-2007
Hello

I'm running Win Vista Business (Swedish version) and have trouble saving a
simple text-file using notepad. Keep getting a messeage (in Swedish) that the
file path or filename is not valid. I believe the reason to the problem is
Vistas new approach to localization of folder names. A number of system
folders have localized names such as "c:\program files" which in my language
is called "c:\program". However the localized name is only "imaginary" as the
real folder name really is "c:\program files", which easily is checked using
a dos prompt and "dir c:\".

After installing programs (in my case mysql) to the suggested folder
"c:\program" everything works fine (including reading and running programs)
except that saving a simple textfile (a config file) in the folder
"c:\program\mysql" doesn't work, as notepad believes that the folder is
"c:\program files\mysql".

The only workaround I've found so far is to save the textfile to another
folder not affected by localization and then move the file (using win
explorer). Increadibly annoying...

It's possible that this problem could have been avoided if I'd installed
mysql to (the unsuggested folder) "c:\program files" instead, but havn't
tried yet.

Are the localized folders so called junctions? (would explain the problem)

I guess this problem affects all Vista versions except English versions
where the folder names are the same as the names shown in explorer. (So this
forum might be the wrong place to discuss this :-)

/Carl

 
Reply With Quote
 
 
 
 
dean-dean
Guest
Posts: n/a

 
      08-02-2007
Opening the (hidden, system) desktop.ini file under c:\program, does it show
this:


[.ShellClassInfo]
LocalizedResourceName=@%SystemRoot%\system32\shell 32.dll,-21781


or does it have this:


[.ShellClassInfo]
LocalizedResourceName=Program


It shouldn't, however, really matter, I wouldn't think, since both Explorer
and, by extension Notepad's Save dialog, knows that this is really the
Program Files folder. In fact, if you try to make a new folder under C:\
called Program Files, you'll get a dialog that the folder already exists,
and either have to merge it or name it Program Files (2). You can rename
the C:\Program folder, though, to Program Files, without a problem. But
again, this may not be the problem with Notepad, but rather Vista's
virtualization of files that are written to the Program Files folder, or in
your case Program folder.

If you go to C:\Program, click on Compatibility Files in the Toolbar of
Windows Explorer. This will take you to C:\Users\(Your
Name)\AppData\Local\VirtualStore\Program Files. This is where Vista puts
the files of programs that write certain types of user files to the
C:\Program subdirectories. When you're in C:\Program\Your
Program (or possibly a subfolder of that path), you should also see a button
in the taskbar of Windows Explorer called "Compatibility Files", which will
you take you directly to your program's config files.

In your program's Options or Preferences dialog, can you change the default
location (path) of the folder that contains your config files (I guess, in
this case, text files) to a path that is under your account name?

For example, try C:\Users\(Your Name)\Documents\My MySQL Data (you may have
to create the folder there first). Then Vista won't re-direct your files.
It doesn't really cotton to user files being written to the C:\Program Files
subdirectories, after the initial installation, and has put the Program
Files folder on a security level as that of the Windows folders themselves,
making TrustedInstaller the owner.

I imagine, too that if you saved your file to the appropriate folder under
C:\Users\(Your Name)\AppData\Local\VirtualStore\Program Files, things would
also go smoothly. If you CAN save to a subfolder of C:\Program (by running
Notepad as Administrator or having UAC off), then it would be appropriate to
have saved it to C:\Program Files\MySQL, even though it *seems* it's path
name, in Explorer is C:\Program.

As to your question about junctions, no, the localized name is a function of
the desktop.ini, and not a function of junctions.

"Carl" <> wrote in message
news:E9014EA9-1EC6-4651-83F1-...
> Hello
>
> I'm running Win Vista Business (Swedish version) and have trouble saving a
> simple text-file using notepad. Keep getting a messeage (in Swedish) that
> the
> file path or filename is not valid. I believe the reason to the problem is
> Vistas new approach to localization of folder names. A number of system
> folders have localized names such as "c:\program files" which in my
> language
> is called "c:\program". However the localized name is only "imaginary" as
> the
> real folder name really is "c:\program files", which easily is checked
> using
> a dos prompt and "dir c:\".
>
> After installing programs (in my case mysql) to the suggested folder
> "c:\program" everything works fine (including reading and running
> programs)
> except that saving a simple textfile (a config file) in the folder
> "c:\program\mysql" doesn't work, as notepad believes that the folder is
> "c:\program files\mysql".
>
> The only workaround I've found so far is to save the textfile to another
> folder not affected by localization and then move the file (using win
> explorer). Increadibly annoying...
>
> It's possible that this problem could have been avoided if I'd installed
> mysql to (the unsuggested folder) "c:\program files" instead, but havn't
> tried yet.
>
> Are the localized folders so called junctions? (would explain the problem)
>
> I guess this problem affects all Vista versions except English versions
> where the folder names are the same as the names shown in explorer. (So
> this
> forum might be the wrong place to discuss this :-)
>
> /Carl
>


 
Reply With Quote
 
Carl
Guest
Posts: n/a

 
      08-06-2007
> Opening the (hidden, system) desktop.ini file under c:\program, does it
show this:
> [.ShellClassInfo]
> LocalizedResourceName=@%SystemRoot%\system32\shell 32.dll,-21781


Yes.

> or does it have this:
> [.ShellClassInfo]
> LocalizedResourceName=Program
>
> It shouldn't, however, really matter, I wouldn't think, since both Explorer
> and, by extension Notepad's Save dialog, knows that this is really the
> Program Files folder. In fact, if you try to make a new folder under C:\
> called Program Files, you'll get a dialog that the folder already exists,
> and either have to merge it or name it Program Files (2). You can rename
> the C:\Program folder, though, to Program Files, without a problem. But
> again, this may not be the problem with Notepad, but rather Vista's
> virtualization of files that are written to the Program Files folder, or in
> your case Program folder.
>
> If you go to C:\Program, click on Compatibility Files in the Toolbar of
> Windows Explorer. This will take you to C:\Users\(Your
> Name)\AppData\Local\VirtualStore\Program Files. This is where Vista puts
> the files of programs that write certain types of user files to the
> C:\Program subdirectories. When you're in C:\Program\Your
> Program (or possibly a subfolder of that path), you should also see a button
> in the taskbar of Windows Explorer called "Compatibility Files", which will
> you take you directly to your program's config files.


Can't find the "Compatibility Files" in windows explorer toolbar, but I
found the "...virtualstore/program files"-folder.

> In your program's Options or Preferences dialog, can you change the default
> location (path) of the folder that contains your config files (I guess, in
> this case, text files) to a path that is under your account name?
>
> For example, try C:\Users\(Your Name)\Documents\My MySQL Data (you may have
> to create the folder there first). Then Vista won't re-direct your files.
> It doesn't really cotton to user files being written to the C:\Program Files
> subdirectories, after the initial installation, and has put the Program
> Files folder on a security level as that of the Windows folders themselves,
> making TrustedInstaller the owner.


In general, that makes sense and especially considering retstoring backups.

> I imagine, too that if you saved your file to the appropriate folder under
> C:\Users\(Your Name)\AppData\Local\VirtualStore\Program Files, things would
> also go smoothly. If you CAN save to a subfolder of C:\Program (by running
> Notepad as Administrator or having UAC off), then it would be appropriate to
> have saved it to C:\Program Files\MySQL, even though it *seems* it's path
> name, in Explorer is C:\Program.


Not to keen on turning off UAC. The best solution seems to be to consider
all this already during installation (compared to previous win version).

> As to your question about junctions, no, the localized name is a function of
> the desktop.ini, and not a function of junctions.


ok, thanks.
carl
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File Open or File Save dialogs crash programs sync0s Windows Vista General Discussion 2 11-26-2008 08:47 PM
How to save a file in Vista's Windows Folder Broadband Al Windows Vista Security 3 09-29-2007 01:19 AM
Include shared folder/file in "save" file list Bill W Windows Vista General Discussion 1 08-08-2007 09:49 PM
No file open,save, save as Larry Windows Vista General Discussion 4 04-01-2007 06:15 PM
File Open and File Save As Dialog Freeze and Hang All Applications Lightfoote Windows Vista File Management 0 07-12-2006 04:39 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59