How can I detect if the operating system is Windows in C++/C?
51114
I need my code to do different things based on the operating system on which it gets compiled. I'm looking for something like this:  #ifdef OSisWindows // do Windows-specific stuff #else // do Unix-specific stuff #endif   Is there a way to do this? Is there a better way to do the same thing?
11468
I have some software and I'd like to know if it works on the next version of Windows (Windows 10).
68669
We are trying to develop a small application that can monitor the programs/processes that are executing in a windows machine.  If the program/process is not supposed to run, it should be blocked. It works similar to an antivirus.  This is the basic idea.  I want to know the ways to hook into the OS to get notified about every single program/process trying to run in the machine.
83756
In C# how do you detect is a specific drive is a Hard Drive, Network Drive, CDRom, or floppy?
71653
I'm trying to start an external application through system() - for example, system("ls"). I would like to capture its output as it happens so I can send it to another function for further processing. What's the best way to do that in C/C++?
100414
How do I get the local machine name?
110172
Is there any package which shows PID of a window by clicking on it?
66724
Is there a platform-agnostic and filesystem-agnostic method to obtain the full path of the directory from where a program is running using C/C++? Not to be confused with the current working directory. (Please don't suggest libraries unless they're standard ones like clib or STL.)  (If there's no platform/filesystem-agnostic method, suggestions that work in Windows and Linux for specific filesystems are welcome too.)
95630
I need a conditional compilation switch that knows if I am compiling for the mono or MS .NET runtime. How can I do this?
9887
How do I see the type of a variable whether it is unsigned 32 bit, signed 16 bit, etc.?  How do I view it?
7562
Whats the easiest way to find out what programming language an application was written in? I would like to know if its vb or c++ or delphi or .net etc from the program exe file.
74863
I'm working with InstallAnywhere, an old program for creating installers. I would like to install a particular file, only in case of Windows XP and Windows Vista.  Due to InstallAnywhere limitations, this is not possible. I can only decide to delete the file once it has already been installed, based on a rule.  Within that rule, I can check for the platform on which I'm running, which gives me the possibility to check for Windows XP, Windows Vista, Windows 7, etc. but not for Windows 10. I can't say "Perform this action when the system is not XP or Vista", so I need to say "Perform this action on all those platforms, which are not XP or Vista".  However, I can launch command-line commands and catch the result, so here's my question: is there a command which I can use for determining if I'm working on a Windows 10 system?
105670
I have some programs running on start-up like . UAC prompts every time the Windows starts. How can I set a program to make sure that no intervening prompt would appear during start-up?
69909
What's the equivalent of # for Windows cmd console sessions, to create a comment?   The operating system is Windows XP.
95171
I want to enumerate all available drive letters (which aren't already taken) in Windows using VC++.  How can I do this?
23794
The difficulty is that it should be cross platform. Windows 2000, XP, Vista, OSX, Linux, other unix variants. I am looking for a snippet of code that can accomplish this for all platforms, and a way to detect the platform.  Now, you should be aware of  that user.home does not work correctly, so please do not provide me of textbook answers, I can find these myself in the manuals.
98392
I would like to keep my .bashrc and .bash_login files in version control so that I can use them between all the computers I use. The problem is I have some OS specific aliases so I was looking for a way to determine if the script is running on Mac&nbsp;OS&nbsp;X, Linux or .  What is the proper way to detect the operating system in a  script?