How can I find path of windows folder using vb.net? It could be winnt or
windows depending upon the os.
System.Environment.SpecialFolder enumeration does not have a constant for
windows folder. 14 18287
This might work for you:
System.Environment.GetEnvironmentVariable("windir" )
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF http://www.apress.com/book/bookDisplay.html?bID=105
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com... How can I find path of windows folder using vb.net? It could be winnt or windows depending upon the os.
System.Environment.SpecialFolder enumeration does not have a constant for windows folder.
Could you get the path for the "system" folder, then navigate one folder up?
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message
news:80**********************************@microsof t.com... How can I find path of windows folder using vb.net? It could be winnt or windows depending upon the os.
System.Environment.SpecialFolder enumeration does not have a constant for windows folder.
Peter Rilling
How can i navigate one folder up?
"Peter Rilling" wrote: Could you get the path for the "system" folder, then navigate one folder up?
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... How can I find path of windows folder using vb.net? It could be winnt or windows depending upon the os.
System.Environment.SpecialFolder enumeration does not have a constant for windows folder.
CT
That didn't work
"CT" wrote: This might work for you:
System.Environment.GetEnvironmentVariable("windir" )
-- Carsten Thomsen Enterprise Development with VS .NET, UML, AND MSF http://www.apress.com/book/bookDisplay.html?bID=105
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... How can I find path of windows folder using vb.net? It could be winnt or windows depending upon the os.
System.Environment.SpecialFolder enumeration does not have a constant for windows folder.
By "navigate" I simply mean that once you have the path to the system
folder, you could then remove the right most folder to get the path to the
Windows folder, either by direct string manipulation of the path, or using
the Path class. This assumes that the system folder is under the Windows
folder, which I never seen it otherwise.
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message
news:E9**********************************@microsof t.com... Peter Rilling
How can i navigate one folder up?
"Peter Rilling" wrote:
Could you get the path for the "system" folder, then navigate one folder
up? "Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... How can I find path of windows folder using vb.net? It could be winnt
or windows depending upon the os.
System.Environment.SpecialFolder enumeration does not have a constant
for windows folder.
Have tried executing the internal set command in a command prompt? Does any
of the environment variables listed show the Windows folder?
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF http://www.apress.com/book/bookDisplay.html?bID=105
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message
news:0D**********************************@microsof t.com... CT
That didn't work
"CT" wrote:
This might work for you:
System.Environment.GetEnvironmentVariable("windir" )
-- Carsten Thomsen Enterprise Development with VS .NET, UML, AND MSF http://www.apress.com/book/bookDisplay.html?bID=105
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... > How can I find path of windows folder using vb.net? It could be winnt > or > windows depending upon the os. > > System.Environment.SpecialFolder enumeration does not have a constant > for > windows folder.
Then get it from registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion | SystemRoot
"Peter Rilling" wrote: By "navigate" I simply mean that once you have the path to the system folder, you could then remove the right most folder to get the path to the Windows folder, either by direct string manipulation of the path, or using the Path class. This assumes that the system folder is under the Windows folder, which I never seen it otherwise.
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:E9**********************************@microsof t.com... Peter Rilling
How can i navigate one folder up?
"Peter Rilling" wrote:
Could you get the path for the "system" folder, then navigate one folder up? "Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... > How can I find path of windows folder using vb.net? It could be winnt or > windows depending upon the os. > > System.Environment.SpecialFolder enumeration does not have a constant for > windows folder.
Hi Peter
got it working as
Path.GetDirectoryName(Environment.SystemDirectory)
Thanks
"Peter Rilling" wrote: By "navigate" I simply mean that once you have the path to the system folder, you could then remove the right most folder to get the path to the Windows folder, either by direct string manipulation of the path, or using the Path class. This assumes that the system folder is under the Windows folder, which I never seen it otherwise.
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:E9**********************************@microsof t.com... Peter Rilling
How can i navigate one folder up?
"Peter Rilling" wrote:
Could you get the path for the "system" folder, then navigate one folder up? "Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... > How can I find path of windows folder using vb.net? It could be winnt or > windows depending upon the os. > > System.Environment.SpecialFolder enumeration does not have a constant for > windows folder.
Peter Rilling
How can i navigate one folder up?
"Peter Rilling" wrote: Could you get the path for the "system" folder, then navigate one folder up?
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... How can I find path of windows folder using vb.net? It could be winnt or windows depending upon the os.
System.Environment.SpecialFolder enumeration does not have a constant for windows folder.
CT
That didn't work
"CT" wrote: This might work for you:
System.Environment.GetEnvironmentVariable("windir" )
-- Carsten Thomsen Enterprise Development with VS .NET, UML, AND MSF http://www.apress.com/book/bookDisplay.html?bID=105
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... How can I find path of windows folder using vb.net? It could be winnt or windows depending upon the os.
System.Environment.SpecialFolder enumeration does not have a constant for windows folder.
By "navigate" I simply mean that once you have the path to the system
folder, you could then remove the right most folder to get the path to the
Windows folder, either by direct string manipulation of the path, or using
the Path class. This assumes that the system folder is under the Windows
folder, which I never seen it otherwise.
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message
news:E9**********************************@microsof t.com... Peter Rilling
How can i navigate one folder up?
"Peter Rilling" wrote:
Could you get the path for the "system" folder, then navigate one folder
up? "Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... How can I find path of windows folder using vb.net? It could be winnt
or windows depending upon the os.
System.Environment.SpecialFolder enumeration does not have a constant
for windows folder.
Have tried executing the internal set command in a command prompt? Does any
of the environment variables listed show the Windows folder?
--
Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF http://www.apress.com/book/bookDisplay.html?bID=105
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message
news:0D**********************************@microsof t.com... CT
That didn't work
"CT" wrote:
This might work for you:
System.Environment.GetEnvironmentVariable("windir" )
-- Carsten Thomsen Enterprise Development with VS .NET, UML, AND MSF http://www.apress.com/book/bookDisplay.html?bID=105
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... > How can I find path of windows folder using vb.net? It could be winnt > or > windows depending upon the os. > > System.Environment.SpecialFolder enumeration does not have a constant > for > windows folder.
Then get it from registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion | SystemRoot
"Peter Rilling" wrote: By "navigate" I simply mean that once you have the path to the system folder, you could then remove the right most folder to get the path to the Windows folder, either by direct string manipulation of the path, or using the Path class. This assumes that the system folder is under the Windows folder, which I never seen it otherwise.
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:E9**********************************@microsof t.com... Peter Rilling
How can i navigate one folder up?
"Peter Rilling" wrote:
Could you get the path for the "system" folder, then navigate one folder up? "Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... > How can I find path of windows folder using vb.net? It could be winnt or > windows depending upon the os. > > System.Environment.SpecialFolder enumeration does not have a constant for > windows folder.
Hi Peter
got it working as
Path.GetDirectoryName(Environment.SystemDirectory)
Thanks
"Peter Rilling" wrote: By "navigate" I simply mean that once you have the path to the system folder, you could then remove the right most folder to get the path to the Windows folder, either by direct string manipulation of the path, or using the Path class. This assumes that the system folder is under the Windows folder, which I never seen it otherwise.
"Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:E9**********************************@microsof t.com... Peter Rilling
How can i navigate one folder up?
"Peter Rilling" wrote:
Could you get the path for the "system" folder, then navigate one folder up? "Job Lot" <Jo****@discussions.microsoft.com> wrote in message news:80**********************************@microsof t.com... > How can I find path of windows folder using vb.net? It could be winnt or > windows depending upon the os. > > System.Environment.SpecialFolder enumeration does not have a constant for > windows folder. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bell, Kevin |
last post by:
I'd love to be able to open up a windows folder, like c:\temp, so that
it pops up visually. I know how to drill down into a directory, but I
can't figure out how to open one up on screen. Would I...
|
by: A.M-SG |
last post by:
Hi,
How can I find the temp folder on the user's machine?
Is there any class that returns me a unique temporary file name?
Thank you,
Alan
|
by: Anand G |
last post by:
All,
How do I share Windows folder programatically? Which namespace/class to look
for?
Thanks in advance for your help.
regards,
Anand
|
by: Jason Madison |
last post by:
Having installed VS 2005 SP 1 whenever I logon to Windows, the Windows
Folder now opens automatically.
Any ideas why this happens and how to stop it?
|
by: soledaddanh |
last post by:
How can i get path of folder by its name in one folder?
|
by: Rick |
last post by:
Can you help me figure out how i can open a windows folder from code?
I want a user to click a button to open a windows folder as you would when
you click on a folder in "My Computer".
...
|
by: Kevin |
last post by:
I'm trying to use a command button to open a windows folder related to the
current record. The record has a Location field that contains the name of
the windows folder, in the current directory...
|
by: tvnaidu |
last post by:
Trying to mount windows folder on Linux machine, getting this error. I have a folder called "CheckIn" on windows, I made that folder as Network sharing.
ON lInux, I tried to access that folder by...
|
by: Roger Housden |
last post by:
I need to rename a series of files that are both referenced in a PLMXML file and are physically located in a Windows folder. I think that command "regx" or "regxPattern" might be able to do this.
...
|
by: Rina0 |
last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: kcodez |
last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: lllomh |
last post by:
How does React native implement an English player?
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |