Page 1 of 1
VirtualStore problem
Posted: Thu Nov 19, 2009 7:21 pm
by shaker
I put this message on another topic thread which will probably have gone stale, because my immediate question there had been answered (many thanks).
However, this is a new (to me) but related problem and I thought it might get more attention as a new topic.
"I've half got my head round VirtualStore, but although it sounds a good security feature, it appears to give a lot of grief to a lot of people.
1) When I use pb to open a file from a specific directory, it seems that I have to key in the file name because the file isn't listed, and therefore can't be selected. This sounds very unlikely and surely there must be a way of getting the file to show for selection!
2) There's no obvious way of deleting a file - even outside pb.
Can anyone help please?"
Many thanks
Re: VirtualStore problem
Posted: Thu Nov 19, 2009 8:25 pm
by freak
Two hours without an answer and you already assume the thread has "gone stale" !? You need to get a life :roll:
Re: VirtualStore problem
Posted: Fri Nov 20, 2009 12:59 pm
by shaker
Freak
I accept what you say, but sorry that you expressed yourself in the way you did.
Please remember this forum is for "those just starting out", and it takes time for relative newcomers to learn forum etiquette. Everyone so far has been extremely helpful and I'm very grateful for this.
I am hoping to get round the VirtualStore problem by avoiding the MS Open and Close windows and writing my own. It seems to work OK on a trial version.
But is there a way of using the MS Open and Close windows and avoiding the problems I've had?
Re: VirtualStore problem
Posted: Fri Nov 20, 2009 1:51 pm
by Kaeru Gaman
I don't understand the term "virtual store" and Leo doesn't give me a translation.
is it an Internet Shop or a Virtual Harddisk or a folder on a network server or what do you mean?
anyways:
with the full version of PB you can call any (Win)API function you want.
the OpenFileRequester should show you every non-hidden file in the open directory that matches the pattern.
use no pattern at all (empty string) to really show all files.
Re: VirtualStore problem
Posted: Fri Nov 20, 2009 2:27 pm
by freak
Kaeru Gaman:
He is talking about the file system virtualisation in Vista and 7 if you try to write to a folder without sufficient access rights.
It becomes clear if you read the original thread:
http://www.purebasic.fr/english/viewtop ... 13&t=40002
shaker:
This is why it is bad to start a new topic just in the hope of getting more answers. People have no idea what you are referring to and so you will get even less helpful responses.
About your problem:
You can turn off the virtualisation for your program if you select the "Request user mode for Windows Vista" checkbox in the compiler options. If you do that your program will not write to the virtualstore folder when you access a protected folder but instead the access will just fail as it should be. The virtualisation mode is intended for compatibility with old programs only. New ones should have this disabled to not confuse the user. The PureBasic IDE has this option set, this is why you do not see the files in it.
> This sounds very unlikely and surely there must be a way of getting the file to show for selection!
Your goal should be to not write any files to the virtualstore (by turning that option on) instead of trying to show the files you put there. Newly written programs should respect the guidelines for these OS, not ignore them and add more hacks just to keep it up.
Re: VirtualStore problem
Posted: Fri Nov 20, 2009 3:40 pm
by RASHAD
Hi shaker
In Windows 7
C:\user\YourUserName\AppData\Local\VirtualStore\ProgramData\YourProgramName\
In Windows Vista it is a little bit different check yourself
1- Choose The system Drive "c:\" ex.
2- Go To control panel-- Folder Opptions -- View
3- Check "Show Hidden Files,folders and drives"
4- Uncheck "Hide empty drives in ........"
5- Uncheck "Hide extensions ......."
6- Uncheck "Hide protected operating system ........"
7- Apply
8- Apply To folders
Now all hidden files ,folders And drives are shown
In Case you are using PB editor To Select a file Please Use All Files(*.*)
because you may be looking For a file With no ext Or mistyped the ext
OK now If you can not delete a file that is may be because you do't own it
in that Case look For how To own a file (it is in the forum I think)
In my Case all the files under VirtualStore I can do what I want To do With it
Run on your own
Remember do't delete a system file and corrupt the OS then you blame me
Re: VirtualStore problem
Posted: Fri Nov 20, 2009 6:11 pm
by shaker
Freak and Rashad,
Many thanks for your advice.
I am using Freak's first.
I ticked the box as required, but the files I then save are still invisible. I rebooted, and checked that the box was still ticked and tried again. Same result.
Will persevere to try to find out what I am doing wrong or not doing.
Re: VirtualStore problem
Posted: Fri Nov 20, 2009 7:27 pm
by shaker
Freak,
I have tried again to file to various locations including a CD. But a search shows only the shortcut to the file. When I click on that, it can't find the file it's a shorcut to. Everything seems to be behaving as it did before the box was ticked.
Will try again in the morning. If I continue to fail, maybe I should post the relevant code.
Re: VirtualStore problem
Posted: Fri Nov 20, 2009 8:02 pm
by Kaeru Gaman
ah, I see... thnx freak
idiotic term "virtual store"...
I agree, this is not at all a new topic.
@shaker
some info
Re: VirtualStore problem
Posted: Sat Nov 21, 2009 7:05 am
by shaker
Kaeru,
Thanks for the excellent Posting tutorial. (A Posters Charter - just what I needed.)
Re: VirtualStore problem
Posted: Sat Nov 21, 2009 8:48 am
by shaker
Having clicked the box, I discovered that the problem was my putting quotes round file$ . So problem solved.
Many thanks to freak, rashad and kaeru for your help and tolerance.
Rashad's suggestions will be useful in trying to sort out future problems.