473,382 Members | 1,359 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,382 software developers and data experts.

How to get the system partition

Hi,

I need to get the directory i.e. the partition of the system directory
for XP .

I need to create a file - in the "?:/windows/system32" directory . But
in which partition is is located ?. I think for everyone writing
installers this is a "klacks" - i.e. "nothing to think about it" as we
call it in germany .

Please Think about it

Rainer
Nov 17 '05 #1
1 8553

"Rainer Faulstich" <Ra**************@ifp-beisch.com> wrote in message
news:d2**************************@posting.google.c om...
Hi,

I need to get the directory i.e. the partition of the system directory
for XP .

I need to create a file - in the "?:/windows/system32" directory . But
in which partition is is located ?. I think for everyone writing
installers this is a "klacks" - i.e. "nothing to think about it" as we
call it in germany .

Please Think about it

Rainer


Read the Environment variable "SystemDrive", or better use
Environment.SpecialFolder.System to get the system32 path.

string systemDrive = Environment.ExpandEnvironmentVariables(%SystemDriv e%);

string s = Environment.GetFolderPath(Environment.SpecialFolde r.System);

Willy.


Nov 17 '05 #2

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

Similar topics

1
by: Tony Bansten | last post by:
Assume I have a partition (under WIn2000/WInXP) which is possibly NOT formatted with a files system (e.g. NTFS). This could be a partition on an external USB harddisc. How do I find out if this...
1
by: Mark Dengler | last post by:
I am trying to write a C# backend program that will handle the database maintenance that I would otherwise have to do via Microsoft's Analysis Services front end GUI Wizards. Currently I am having...
0
by: BK Drake | last post by:
I am trying to assign a drive letter to a hidden partition. I have a hard drive that has 2 paritions - a system and a data partition. When I retore with an image the system drive the data drive...
8
by: John | last post by:
Hi I am getting this error when running a project; An unhandled exception of type 'System.ExecutionEngineException' occurred in system.dll What can I do to fix this problem? Using vs.net...
1
by: ScriptPepe | last post by:
Hello Everybody. A pleasure to be here. I need a script for reinitiate my system . Actually I have four systems (all the same xp pro). Manually My Pc - properties - advanced options -...
2
by: -Lost | last post by:
VS2K8 Pro *MUST* reside on the system partition?! I finally got a faster drive with a little more memory in my laptop so I figured I'd upgrade from Visual C# Express 2005 to Visual Studio 2008...
1
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: 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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.