473,513 Members | 2,777 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows directory

Hi all.
How can I retrieve the windows directory (not system!) in VB.Net?
Thanks in advance.

VV
Nov 21 '05 #1
4 1235
http://www.codeproject.com/useritems/SystemUtility.asp

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Wally" <va****@nospamcambieri.it> wrote in message
news:Fh***********************@news3.tin.it...
Hi all.
How can I retrieve the windows directory (not system!) in VB.Net?
Thanks in advance.

VV

Nov 21 '05 #2
Hi,

Trace.WriteLine(Environment.GetEnvironmentVariable ("windir"))

Ken

-------------------

"Wally" <va****@nospamcambieri.it> wrote in message
news:Fh***********************@news3.tin.it...
Hi all.
How can I retrieve the windows directory (not system!) in VB.Net?
Thanks in advance.

VV

Nov 21 '05 #3
On Wed, 15 Sep 2004 13:17:25 GMT, "Wally" <va****@nospamcambieri.it> wrote:

¤ Hi all.
¤ How can I retrieve the windows directory (not system!) in VB.Net?
¤ Thanks in advance.

Dim WinSysPath As String = System.Environment.GetFolderPath(Environment.Speci alFolder.System)
Dim WinPath As String = WinSysPath.Substring(0, WinSysPath.LastIndexOf("\"))
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 21 '05 #4
Good answer , much cleaner than mine and managed as well !

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:en**************@TK2MSFTNGP15.phx.gbl...
Hi,

Trace.WriteLine(Environment.GetEnvironmentVariable ("windir"))

Ken

-------------------

"Wally" <va****@nospamcambieri.it> wrote in message
news:Fh***********************@news3.tin.it...
Hi all.
How can I retrieve the windows directory (not system!) in VB.Net?
Thanks in advance.

VV

Nov 21 '05 #5

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

Similar topics

2
1193
by: Austin | last post by:
I would like to write a program which creates the folders in specific directory. For example, I want to create folder in Program Files. How do I know which is in C:\ or D:\ Is there any function...
4
3569
by: Abhishek Srivastava | last post by:
Hello All, Many people ask this question. I have installed .Net framework I wrote a program but I can't find csc.exe. I have to tell them that it is inside windows directory. But I myself don't...
0
1035
by: J. Ahorn | last post by:
Hi there! With System.Environment.GetEnvironmentVariable("windir") I get the windows-directory (e. g. c:\winnt). At Terminal-Server (W2K) each user has its own windows-directory in c:\dokuments...
3
15403
by: Shelby | last post by:
Hi, is there a better way to get the Windows directory? I manage to get the system directory with : System.Environment.SystemDirectory So I was wondering how do I get the Windows directory?
3
1705
by: Richard L Rosenheim | last post by:
Is there a method in the .NET Framework that returns the path to just the Windows directory? The closest I've been able to find is System.Environment.SystemDirectory. On my machine, it returns...
2
1210
by: Shilpa | last post by:
Hi All, I need the C# code to open a windows directory. Regards, Shilpa
2
2579
by: perspolis | last post by:
Hi How can I get name of Windows directory in c# without using API??
9
11743
by: guitonoklops9 | last post by:
I am very new to python and programming. Right now I'm working on this simple backup program: #C:\python25\programs\ # File name: test import os, time source = target_directory =...
0
1796
by: AdelineSan | last post by:
Hey all, I have problem in windows directory list. I have IIS installed in my windows server 2003 (VMWare) and setting up a file server in this computer. I would like to know where is the HTML of...
0
7254
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1585
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.