473,797 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.environm ent API calls for 32 and 64 bit OS

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.Get FolderPath(Envi ronment.Special Folder.CommonPr ogramFiles);

string programfiles =
Environment.Get FolderPath(Envi ronment.Special Folder.ProgramF iles);

Jun 18 '06 #1
1 3618
Hope some information here can be useful for you
http://msdn.microsoft.com/msdnmag/is...spx?print=true

chanmm

"codejunkie " <go****@gmail.c om> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.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.Get FolderPath(Envi ronment.Special Folder.CommonPr ogramFiles);

string programfiles =
Environment.Get FolderPath(Envi ronment.Special Folder.ProgramF iles);

Jun 18 '06 #2

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

Similar topics

9
4965
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my webserver runs that part of the script (see attached file, snippet.php), though, it doesn't go through. I don't get an error message or anything...it just returns a "1" (whereas it should return a "0") as far as I can tell. I have read the PHP...
0
1823
by: Sanket | last post by:
I have a java application, which generates a html file. Here is how main method looks like public static void main(String args) { //Create a new file using File class. //Make backend calls and get data. //Write to the file using filewriter and close the file. System.out.println("abc.html is generated succesfully"); System.exit(0);
3
1240
by: skilpat | last post by:
My Python script is basically glue for a lot of batch files and whatnot, so it uses os.system liberally. However, there is a strange problem where the scripts called by os.system do not function correctly in the Python code, but work fine when I simply copy and paste the command into the shell myself. I am thinking it's some sort of permissions issue. The batch files contain multiple calls to other scripts as well... don't know if that has...
9
2880
by: Jon LaBadie | last post by:
Suppose I'm using stdio calls to write to a disk file. One possible error condition is no space on file system or even (in unix environment) a ulimit of 0 bytes. Which calls would be expected to return error codes for such conditions? Would it happen on the writes (fwrite, fprintf, fputs ...), or as they actually write to io buffers, might the errors not occur until the data is flushed or the file is closed?
2
2361
by: Stressed Out Developer | last post by:
We have an application that has a 200 count loop that does the following: ' Each time thru the loop we pass the next IP Address is a range (aka 192.168.4.50 thru 192.168.4.254) Try If mUIO_Threads(i) Is Nothing Then mUIO_Threads(i) = New System.Threading.Thread(AddressOf mUIO_DAQ(i).InitDAQ) mUIO_Threads(i).Name = mUIO_DAQ(i).UIO_IPAddr mUIO_Threads(i).IsBackground = False
14
2820
by: prasadjoshi124 | last post by:
Hi All, I am writing a small tool which is supposed to fill the filesystem to a specified percent. For, that I need to read how much the file system is full in percent, like the output given by df -k lopgod10:~/mycrfile # df -k /mnt/mvdg1/vset Filesystem 1K-blocks Used Available Use% Mounted on
5
3478
by: Henaro | last post by:
Hello~ I am having trouble setting environment variables in C++ on win32. The code that is not working is: char prxy; char pf_cmd1 = "set http_proxy="; ....
21
2460
by: omkar pangarkar | last post by:
Hi all, I have two simple hello world programs one using printf() and other using write() --prog 1-- #include<stdio.h> #include<stdlib.h> int main() { printf("Hello"); /* up to here write() isn't called, if u * give \n here then two write()s will
0
10245
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
10205
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
10021
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
9063
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6802
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5458
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
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4131
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
3
2933
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.