windows

Native Windows application for checking system requirements and starting .NET application?

I need Windows executable that checks basic system requirements (e.g. if .NET is installed) and either starts .NET application or gives instructions to user what's missing. I know I could use an installer to check prerequisites but client would like to avoid this. Do you know about tool that could help me with this? ...

What are good options for Windows GUI toolkits for a Perl program?

I am considering doing some automation of tasks on my Windows desktop (e.g. sorting through large collections of music/text/photo files, etc...). Seeing how my main area of developer expertise is Perl on Unix, I'd prefer to stick to Perl for coding the business logic of whatever I need done, just for the sake of development efficiency....

How to create Chrome like application in Delphi which runs multiple processes inside one Window?

Is it possible to create an "application group" which would run under one window, but in separate processes, like in Chrome browser? I'd like to divide one application into multiple parts, so that one crashing or jamming process cannot take down others, but still keep the look and feel as close to original system as possible. I know the...

Xcopy: Works fine *to* NAS drive, but not *from* NAS drive

I'm using xcopy in Windows to copy just the changed files between some folders on my local machine and an NAS drive in our office. When I do it from the NAS to local, it works fine (i.e., it only copies over the files that have changed or been added).But, when I do it from my local drive to the NAS, it always copies over all the files. ...

Python code does not work as expected when I run script as a Windows Service

Here is the code to get Desktop path on Windows Vista. import pythoncom import win32com.client pythoncom.CoInitialize() shell = win32com.client.Dispatch("WScript.Shell") desktop_path = shell.SpecialFolders("Desktop") Code works fine when I tried on python interpreter but its not working when I execute the same code from Python scrip...

What's a good way to debug Windows message content and destination?

I'm working on an application that simulates a Windows mouse based on other behavior. One example is that pressing the + or - keys on the keyboard sends the WM_MOUSEWHEEL message to a target window with an appropriate delta. The problem is that in some situations I'm having a hard time replicating the messages that i think windows is s...

Flymake is not working for me on Windows Emacs

Debugger entered--Lisp error: (void-variable compilation-error-regexp-alist-alist) (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist) (append (quote (... ... ... ... ... ...)) (flymake-reformat-err-line-patterns-from-compile-el compilation-error-regexp-alist-alist)) (defvar flymake-err-line-pa...

Get child window handles in C#

I'm starting a process in C# and then sending Windows messages to that process with SendMessage. Usually I send the messages to Process.MainWindowHandle, but in some instances I might need to find a child window handle and send messages there instead. How would I do that in C# and what are the options for finding child windows (i.e. do...

Setting Access permissions on Semaphore?

I am assuming that once a semaphore is created by a process, it will be accessible by any process/user. Is it possible to put access restrictions on a particular semaphore so that it can be accessible by only certain processes/users or only certain processes can release the semaphore. I see some problems if we make a semaphore accessibl...

Creating a new thread (C, Windows)

OK, I'm a bit confused here. The following code works: HANDLE CreateSideThread() { DWORD dwGenericThread; HANDLE hThread1 = CreateThread(NULL, 0, CallBackFunc, NULL, 0, &dwGenericThread); return hThread1; } int main() { HANDLE Thread1; Thread1 = CreateSideThread(); WaitForSingleObject(hThread1, INFINITE); ...

Run Apache 2.2 as a single httpd.exe for debugging.

I'm running Apache 2.2 in console mode on Windows to test an apache module I'm writing. By default, a parent httpd.exe is started (with one thread), which starts a child httpd.exe with a number of worker threads. Now I have to attach the debugger to the child process each time to be able to debug my module. Is there a way to configure ...

Windows xp Change Wallpaper to Webpage

To do this manual i just pick a html file in the change wallpaper dialog and tada works.. but if i want to do this from code what api calls / reg keys must i change? Iv tryed this SystemParametersInfo (WinAPI) didnt work and i have found out that "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Desktop\General\Wallpaper" and "HK...

What is the maximum width of a widget that's allowed to be created in Windows CE

We are trying to create a widget of width larger than 2^15 pixels and the widget gets only black (no content shown) when we pass the 2^15 pixel barrier. Is there any documented maximum size limits imposed on widgets? Any help is appreciated. Not only CE but I am interested in desktop Windows as well. P.S: Using C++ ...

What are common Windows service design patterns?

Where can I find good information on common design patterns that might be employed when building a new Windows service? *Update: I'm asking if there are common designs that are used when constructing a service. For example: I have seen a single task get executed on a timer (this seems very common when constructing a service). I've...

MouseProc hook and WM_LBUTTONDBLCLK

I have a hook setup for getting mouse events in a plugin I develop. I need to get the WM_LBUTTONDBLCLK, and I expect the message flow to be: WM_LBUTTONDOWN, WM_LBUTTONUP, WM_LBUTTONDBLCLK If the I call the next hook when dealing with the first WM_LBUTTONDOWN, then the flow is as expected. However, if I return my own result, then the ex...

Why does MSVC++ give my an error if I try to compile a header into an include without a newline? (C++/Windows)

I'm using MSVC++ to program a simple window, and I included a resource file for a menu along the lines of: MYMENU MENU DISCARDABLE //etc. and I created a header file "resourcedef.h" with definitions like #define ID_MYMENU_FILE_CLOSE 1002 I can include it in my main.cpp file without error, however, when I include it in the resource ...

Get users AD groups from command line (non-truncated)

I often use the net user command to have a look at AD groups for a user: net user /DOMAIN <username> This works well, however the group names are truncated to around 20 characters. And in my organization, most group names are much longer than this. Does anyone know of a way to get non-truncated AD groups through the command line? ...

Python ctypes and not enough arguments (4 bytes missing)

The function i'm trying to call is: void FormatError (HRESULT hrError,PCHAR pszText); from a custom dll using windll. c_p = c_char_p() windll.thedll.FormatError(errcode, c_p) Results in: ValueError: Procedure probably called with not enough arguments (4 bytes missing) Using cdll instead increases the bytes missing counter to 12....

How do I make wget properly quiet?

wget always echoes system values to the console, even when I specify -q (quiet) on the command line, e.g.: C:\> wget -q http://www.google.com/ SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc C:\> How do I make the noise stop? ...

BASH: Strip new-line character from string (read line)

Hello! I bumped into the following problem: I'm writing a Linux batch script which does the following: Read line from file Strip the \n character from the end of the line just read Execute the command that's in there Example: commands.txt ls ls -l ls -ltra ps as The execution of the batch file should get the first line, and execu...