473,320 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

find a users default save location

HI,

my program needs to save and write to a file on the users machine. I
dont want to specift a particular location in case it doesnt exist.
whats the best way to search for a user default save location (i.e
documents and settings) in vb,net

Can i search the regsitry? if so whats the code for this?

Many thanks

Marc

Dec 23 '06 #1
2 1915
I'd use one of these two:

Application.CommonAppDataPath
Application.LocalUserAppDataPath

HTH,
Tom Dacon
Dacon Software Consulting

"Marc" <ma*********@hotmail.comwrote in message
news:11*********************@42g2000cwt.googlegrou ps.com...
HI,

my program needs to save and write to a file on the users machine. I
dont want to specift a particular location in case it doesnt exist.
whats the best way to search for a user default save location (i.e
documents and settings) in vb,net

Can i search the regsitry? if so whats the code for this?

Many thanks

Marc

Dec 23 '06 #2
Are you talking about the Application Data path or the Internet Explorer
default save location?

To get the application path:

Dim strAppPath As String =
Environment.GetFolderPath(Environment.SpecialFolde r.ApplicationData).ToStrin
g
MessageBox.Show(strAppPath, "Application Data Path")

To get the IE default save location, read the following registry key:

HKEY_USERS\[User's SID]Software\Microsoft\Internet Explorer\Main\Save
Directory

One more thing: SPOOF YOUR E_MAIL ADDRESS IF YOU DON'T WANT TO BE SPAMMED

I hope this helps,

Newbie Coder
Dec 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
8
by: DanB | last post by:
This is probably soooo simple but I can't seem to get it. I have a text file that I want users to download via a web page. I want the file to be saved to a default folder (or one that they...
3
by: sweetpotatop | last post by:
Hello, Is it possible in asp.net to create a dynamic page for web-user, who can create a flow-chart/work flow, with boxes, links and have an option to save it. So that, when others go to the web...
0
by: Jeff | last post by:
Hey asp.net 2.0 I want my website to be available only for authenticated users (except the front page (Default.aspx) which all users can view). If an anonymous user tryes to access other...
1
by: goose28 | last post by:
Instructions for creating a silent install project in Visual Studio.NET 2003 for "All Users". 1) Create a default setup project for your application using Visual Studio (File/New/Setup and...
8
by: T. Crane | last post by:
Hi, How is the default path chosen in this instance: myFile = file('test.txt','w') Here I'm opening/creating a file but I have not specified the exact path, so how does Python determine...
2
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
4
by: emily224 | last post by:
Hello, I have been trying to understand this source code, which I retreived from my online course test. I would like to know how to find the answer for the question on the test. Im sure the answer...
10
by: CodeNoob | last post by:
please help been working on a project got it down to 5 errors from 100 now i have no idea what to do. Errors: init: deps-jar: Created dir: C:\Users\Tommy\Desktop\build\classes Compiling 306...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.