windows

How to monitor process/program execution in windows?

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 prog...

If the user uninstalls your program, what do you do with the user data?

I'm a developer in need of ammo. If the user chooses to uninstall your program, what do you do with the data your program kept in HKEY_CURRENT_USER, and other parts of the user profile? The program stores user data (logs, etc) in the user folders. The client wants an uninstall to remove all those data...for all users. At the same time...

How to determine that a screensaver is running?

One solution that one could suggest is to periodically look for a special 'Screen-saver' desktop, and if it's present then count it as a running screensaver. But apparently this is not the case for all screensavers as with some the mentioned desktop is always present. Are there more reliable solutions for this? ...

Spawn subprocess that expects console input without blocking?

Hello, I am trying to do a CVS login from Python by calling the cvs.exe process. When calling cvs.exe by hand, it prints a message to the console and then waits for the user to input the password. When calling it with subprocess.Popen, I've noticed that the call blocks. The code is subprocess.Popen(cvscmd, shell = True, stdin = subp...

How to determine if the current window is the active window?

How can I tell if my window is the current active window? My current guess is to do GetForegroundWindow and compare the HWND with that of my window. Is there a better method than that? I'm using Win32 API / MFC. ...

where ODBC File DSN in Windows Vista

Hi, In Windows XP, 2003 there is one entry in the registry for ODBC file DNS location in the system: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC File DSN\DefaultDSNDir Where can I get the default DSN folder in Windows Vista and/or Windows 2008 Thanks, ...

Entrypoint of an OCX

What are the entrypoints of an ocx ? are they same as that of com dlls ? ...

Fixing the position of a form

I am starting a winform application[.NET 3.5, C#], where in the the main form of the application starts at a particular specified location. Am calling the following code in the constructor for this private void SetFormPosition() { this.StartPosition = FormStartPosition.Manual; this.Left = Screen.PrimaryScreen.Wo...

Font color of disabled listbox

Hi everybody! I want to draw some listview items disabled and would like to mimic the appearance of a disabled standard Windows listbox. Which colors does it use? I can't find anything in my reference chart :-) or with Google. Edit: Shortly after posting the obvious occurred to me - it seems to be COLOR_GRAYTEXT. ...

Display Windows character map applet?

What's the best way to display Windows' character map applet from my .NET (C#) application? I know it's an optional component, so I want to display a message to the user if they don't have it installed. I've tried using ShellExecute( 0, "OPEN", "charmap.exe", "", "", 0 ); but all that happens is my app loses focus and character map ...

Detect windows logout in Java

Is there a library that I can use with Java to listen for user logout and possibly other Windows events? (Even better if it supports multiple platforms!) I remember reading about a library of this sort a number of years ago, but can't seem to find it now. I've seen other threads to do essentially the same thing using Python with win32...

How can I set the Windows PATH variable from Perl?

I need to set the an environment variable from within Perl. Ideally, I need to query a variable and then change it if it is not what is required. Specifically it is the PATH variable I want to change. Can someone tell me how to get and set these variables? ...

Domain Users Can't Use Remote Desktop to Access Domain Controller

I have a room with (4) Windows 2003 x86_64 systems running over a LAN. The domain controller is running Active Directory, which is enforcing a global security policy. Admins are able to remote into the domain server. Domain users are not. Domain users are members of one group, the Domain Users group. Under the global policy the foll...

How do you open a browser to a URL using ActivePerl on Windows?

In ActivePerl on Windows, how do I open a browser to some URL? In Python, there is webbrowser.open(url), but I can't seem to find the Perl equivalent. ...

Is the DirectX input the right choice for keyboard handling in games?

What is the prefered way of handling keyboard input in programs like games? Is directX input the easiest choice? What are the other options? ...

How to get text from the screen

There is some Win OS API call or so that would let one obtain text from the screen not via obtaining a snapshot and then doing OCR on it, but via API the idea is to get the text that is under the mouse that the user points to and clicks on. This is how tools like Babylon ( www.babylon.com ) and 1-Click Answers ( http://www.answers.com...

simplest xml editor for non programmers

Hi I need the simplest editor with utf-8 support for editing xml files in windows; something like wordpad is perfect. It's for a non programmer, to edit existing files (up to now he used wordpad, but now that I translated the files in utf-8 encoding a lot of italian accents are obviously unreadable). Any suggestion? Thanks, this would ...

Appropriate Installation Directory

I have a program which needs installing on windows 64 boxes. Most of the application has been ported to 64 bit but there are still one or two minor modules which we haven't ported mostly due to third party dependencies. Where should I install this programme? C:\program files (x86) or c:\program files? Because it is a mixture I am lean...

Checking, at runtime, for existence of a function in a program

I am writing a program that is meant to be extended by some function definitions. One of the way of compiling the program is to create a single executable linking your code to the main code. The problem is: one of the function to define is optional and I need to test for that. On Linux, here is what I am doing: Compile the program with...

How do I read Unicode-16 strings from a file using POSIX methods in Linux?

I have a file containing UNICODE-16 strings that I would like to read into a Linux program. The strings were written raw from Windows' internal WCHAR format. (Does Windows always use UTF-16? e.g. in Japanese versions) I believe that I can read them using raw reads and the converting with wcstombs_l. However, I cannot figure what locale ...