From: Ivar on 3 Mar 2010 04:11 Hi All. I'm looking for a little function: Pass a string, return a string. A VB6 app wants to write a file, The users chosen path is 'C:\FileName.ext'. The app 'appears' to do this but actually writes to file to a completely different path, something like 'C:\Users\UserName\AppData\Local\VirtualStore' This is UAC Virtualization. AKA Data Redirection I would like a function where I can pass the users chosen location and it will return the the actual path that the file will be written to. Any pointers please Thanks Ivar
From: Dee Earley on 3 Mar 2010 06:01 On 03/03/2010 09:11, Ivar wrote: > Hi All. > > I'm looking for a little function: Pass a string, return a string. > A VB6 app wants to write a file, The users chosen path is > 'C:\FileName.ext'. The app 'appears' to do this but actually writes to > file to a completely different path, something like > 'C:\Users\UserName\AppData\Local\VirtualStore' > This is UAC Virtualization. AKA Data Redirection > I would like a function where I can pass the users chosen location and > it will return the the actual path that the file will be written to. > Any pointers please There is no such function. That path is not made public, or exposed to any app and is subject to change. If you want to get the full path, add the vista manifest to your EXE so it correctly gets a permissions error rather than the write being faked to elsewhere. -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems
From: mayayana on 3 Mar 2010 09:21 I'm curious what the value is in knowing the path. For a normal user on Vista/7 it's no longer a PC, really. It's a service appliance. *One does not have the right to access the filesystem*. Looking at it the other way, if you're going to run with normal user rights, why would you need to access the filesystem? The presumption is that you have some kind of software that a person uses to create, save and edit personal files. Since you have the rights of the person using the software, you also have to take the approach that you're using a service rather than an OS. I don't mean to criticize your question. Just exploring, interested to know how different people deal with these things. I wonder if you could set up a file system activity monitor, but then that would probably require admin rights. > > I'm looking for a little function: Pass a string, return a string. > A VB6 app wants to write a file, The users chosen path is 'C:\FileName.ext'. > The app 'appears' to do this but actually writes to file to a completely > different path, something like > 'C:\Users\UserName\AppData\Local\VirtualStore' > This is UAC Virtualization. AKA Data Redirection > I would like a function where I can pass the users chosen location and it > will return the the actual path that the file will be written to. > Any pointers please > > Thanks > > Ivar >
From: Ivar on 3 Mar 2010 11:11 Take these two examples to explain my question Using MS Word 2002 on Windows 7 I open word, type some text and save file to C Drive, all appears OK, except the file is not there in explorer I open Notepad, type some text and try to save to C Drive, Notepad informs me that I do not have permission to save to this location. So what I would like to do is something like Notepad, Test if the user has permission to write a file to the selected location and if not then suggest an alternative, rather than how word 2002 and my prog does it. Thanks Ivar
From: Dee Earley on 3 Mar 2010 12:33 On 03/03/2010 16:11, Ivar wrote: > Take these two examples to explain my question > Using MS Word 2002 on Windows 7 > I open word, type some text and save file to C Drive, all appears OK, > except the file is not there in explorer > I open Notepad, type some text and try to save to C Drive, Notepad > informs me that I do not have permission to save to this location. > So what I would like to do is something like Notepad, Test if the user > has permission to write a file to the selected location and if not then > suggest an alternative, rather than how word 2002 and my prog does it. As I said, use the manifest. Notepad has it, Word 2002 doesn't. The redirection is ONLY for older "incompatible" applications that expect to be able to write to these locations. -- Dee Earley (dee.earley(a)icode.co.uk) i-Catcher Development Team iCode Systems
|
Next
|
Last
Pages: 1 2 Prev: VB6 With/End With - how to pass the object itself? Next: Debugging Tricks : Going Blank |