Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to find a folder with VB5

Status
Not open for further replies.

peterd51

Technical User
Feb 22, 2005
109
GB
Hi,

I'm looking to store a temporary file on a users PC that can keep info, such as the last file that they looked at. The idea is that it'll start from that point when the user next runs the .exe.

I'm thinking of placing this file in the temp, or maybe the cookies, folder.

How do I check the users PC to find the location of these folders please?

Regards
Peter


 
This is precisiely the sort of thing that can go in the registry ...
 
Hi,

I've no doubt that it can.

But how would I find it please?

Regards
Peter
 
Do a Google search on something like "visual basic registry" and you will find out in minutes.
 
>I've no doubt that it can.
>
>But how would I find it please?

You misunderstand me, I think. I meant that the sort of information you are thinking should go in a file is actually the sort of information that could be stored in and retreived from the registry. It only takes a simple line or two of VB code to do this (and guitarzan has been a spoilsport and revealed the necessary VB functions in their post above, so a quick look at the VB help files should be all you need now)
 
Hi,

thanks for the suggestions.

TBH I'd rather not play around with the registry. Strongm, sorry, I thought you meant the folder locations where held in the registry. I'm not too well up on reading and writing there as I try to avoid any contact with it if possible.

I'll have a play around with the code I've just got from the link above and hopefully that'll do what I need, otherwise I'll just bung my file on the C-drive.

Regards
Peter



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top