A Ariel Gimenez Apr 27, 2004 #1 Hi, i need to know in my code where is the windows folder in c# any ideas? Thanks in advance
M Morten Wennevik Apr 27, 2004 #2 Hi, Not quite sure, but I suspect you could use System.Environment.SystemDirectory and strip the system directory from that string. Happy coding! Morten Wennevik [C# MVP]
Hi, Not quite sure, but I suspect you could use System.Environment.SystemDirectory and strip the system directory from that string. Happy coding! Morten Wennevik [C# MVP]
G Guest Apr 27, 2004 #3 H The following is a C# example of how to retrieve all environment variables IDictionary id String sString ArrayList values = new ArrayList() m_env_list.Items.Clear () id = Environment.GetEnvironmentVariables() foreach (DictionaryEntry myEntry in id sString = myEntry.Key.ToString() sString += "=" sString += myEntry.Value.ToString() m_env_list.Items.Add(sString) HT Ravikanth[MVP]
H The following is a C# example of how to retrieve all environment variables IDictionary id String sString ArrayList values = new ArrayList() m_env_list.Items.Clear () id = Environment.GetEnvironmentVariables() foreach (DictionaryEntry myEntry in id sString = myEntry.Key.ToString() sString += "=" sString += myEntry.Value.ToString() m_env_list.Items.Add(sString) HT Ravikanth[MVP]
T Tom Porterfield Apr 27, 2004 #4 Ariel said: Hi, i need to know in my code where is the windows folder in c# any ideas? Thanks in advance Click to expand... string winfold = System.Environment.GetEnvironmemtVariable("windir"); -- Tom Porterfield MS-MVP MCE http://support.telop.org Please post all follow-ups to the newsgroup only.
Ariel said: Hi, i need to know in my code where is the windows folder in c# any ideas? Thanks in advance Click to expand... string winfold = System.Environment.GetEnvironmemtVariable("windir"); -- Tom Porterfield MS-MVP MCE http://support.telop.org Please post all follow-ups to the newsgroup only.