By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,733 Members | 930 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,733 IT Pros & Developers. It's quick & easy.

System.environment API calls for 32 and 64 bit OS

P: n/a
I am porting my current project to a 64 bit machine and I am having
some issues with folder paths that vary between a 64 and 32 machine for
any 32 bit application.

The below calls return c:\program files in a 32 bit machine and 64 bit
machine. But i am looking for c:\program files X86 folder in the 64 bit
machine.

How can i implement this in the least number of steps. Can I modify the
below call to specify that i am looking for the 32 bit path?
Thanks in advance.

string commonFiles =
Environment.GetFolderPath(Environment.SpecialFolde r.CommonProgramFiles);

string programfiles =
Environment.GetFolderPath(Environment.SpecialFolde r.ProgramFiles);

Jun 18 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hope some information here can be useful for you
http://msdn.microsoft.com/msdnmag/is...spx?print=true

chanmm

"codejunkie" <go****@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
I am porting my current project to a 64 bit machine and I am having
some issues with folder paths that vary between a 64 and 32 machine for
any 32 bit application.

The below calls return c:\program files in a 32 bit machine and 64 bit
machine. But i am looking for c:\program files X86 folder in the 64 bit
machine.

How can i implement this in the least number of steps. Can I modify the
below call to specify that i am looking for the 32 bit path?
Thanks in advance.

string commonFiles =
Environment.GetFolderPath(Environment.SpecialFolde r.CommonProgramFiles);

string programfiles =
Environment.GetFolderPath(Environment.SpecialFolde r.ProgramFiles);

Jun 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.