473,671 Members | 2,168 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 1242
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****@nospamc ambieri.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.Ge tEnvironmentVar iable("windir") )

Ken

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

"Wally" <va****@nospamc ambieri.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****@nospamc ambieri.it> wrote:

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

Dim WinSysPath As String = System.Environm ent.GetFolderPa th(Environment. SpecialFolder.S ystem)
Dim WinPath As String = WinSysPath.Subs tring(0, WinSysPath.Last IndexOf("\"))
Paul ~~~ pc******@amerit ech.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***@bellsout h.net> wrote in message
news:en******** ******@TK2MSFTN GP15.phx.gbl...
Hi,

Trace.WriteLine (Environment.Ge tEnvironmentVar iable("windir") )

Ken

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

"Wally" <va****@nospamc ambieri.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
1201
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 to get the active path? Thanks in advance.
4
3580
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 understand what is the csc.exe compiler doing over there. Why is the C# compiler in the windows directory? Is the compiler a part of windows? or is windows os is a part of the compiler. Why can't it be in its own directory? (like all other...
0
1039
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 and settings\username\windows. How can I get this user-windows-directory? Jürgen
3
15416
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
1710
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 "C:\Windows\System32". What I'm looking for in this case is "C:\Windows". TIA, Richard Rosenheim
2
1216
by: Shilpa | last post by:
Hi All, I need the C# code to open a windows directory. Regards, Shilpa
2
2581
by: perspolis | last post by:
Hi How can I get name of Windows directory in c# without using API??
9
11760
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 = 'C:/Backup/' today = target_directory + time.strftime('%m.%d.%Y')
0
1803
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 this website page generated? I have attached a image for better understanding. Hope to heard from u guys soon. thanks in advance(:
0
8393
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8914
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8820
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8598
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8670
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4224
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2810
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 we have to send another system
2
2051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.