windows

Monitor Windows Share

I am trying to monitor connections to a windows share using C#, I am pretty sure it’s possible since you can see people connected to you from Windows Console Manager. While I don't mind a solution using WMI I would prefer some alternate method. What I mean by connections is when someone opens a share on the PC being monitored or a file...

How to use nokogiri from Jruby on Windows?

Hello, I'm getting the following error when trying to use Nokogiri with Jruby on Windows 7 D:\code\h4>jruby -e "require 'rubygems'; require 'nokogiri'" D:/jruby-1.3.1/bin/../lib/ruby/1.8/ffi/library.rb:18:in `ffi_lib': Could not ope n any of [xml2, xslt, exslt] (LoadError) from D:/jruby-1.3.1/lib/ruby/gems/1.8/gems/nokogiri-1.3....

.NET FileInfo.LastWriteTime & FileInfo.LastAccessTime are wrong

When I call FileInfo(path).LastAccessTime or FileInfo(path).LastWriteTime on a file that is in the process of being written it returns the time that the file was created, not the last time it was written to (ie. now). Is there a way to get this information? Edit: To all the responses so far. I hadn't tried Refresh() but that does not ...

Message loop gets blocked when application menu has the focus

Hi, I'm developing an application that looks mainly like this: while (true) { while (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE)) { TranslateMessage(&Msg); DispatchMessage(&Msg); } DoSomething(); Sleep(1); } What I noticed is that DoSomething() doesn't get called when I click on the menu bar (displaying ...

Linux vs Windows Programming?

I've spent the last 5 years developing software with Windows as the target OS (mainly C++ and C#). Recently I started to become interested in development for other environments as well, Linux for example. So I guess I actually have two questions. The first is: Do you find developing software for Linux harder than developing for Windows?...

How to get %USERPROFILE% from ruby?

Hello, how can I read the %USERPROFILE% variable from ruby in windows seven? ...

Rails- MiniMagick commands not working

I'm running windows xp and I've got MiniMagick and ImageMagick installed (latest versions). I'm now using the console to test out that everything works. Using the ms command prompt image magick works no problem. I'm testing this by using the identify command. Now, when I try to use MiniMagick from the console by entering image = MiniMag...

Examples of compiling win32 api c programs (through command line) on windows

Attempting to do something very simple - compile basic win 32 c programs through windows cmd. This is something I should be able to do myself, but I am just so stuck here.. I keep stumbling into weird problems, vague errors. I dunno whether I should go into details. Using tcc ( tiny c compiler) One simple hellowin.c example from a b...

Windows SDK dlls

Hi, I have a Qt and Windows SDK based Software (for COM-Port access). I used Qt creator for this project. Now I try to deploy it on another computer. But the dlls from the Windows SDK are missing. I can't find them and I am not sure how to create them. If I run the application with Qt creator everything works fine. Any hints where I c...

Retrieving the control's handle (HWND) in Microsoft Active Accessibility.

I want to get the HWND for a given control. I'm using Active Accessibility API to traverse the control hierarchy for a given window. If I call WindowFromAccessibleObject when I find the control I want, it returns a HWND to the window itself and not the control. I think this is because it is using the parent IAccessible pointer and not t...

Detecting symlinks (mklink) on Vista/7 in Python without Pywin32

Currently the buildout recipe collective.recipe.omelette uses junction.exe on all versions of Windows to create symlinks. However junction.exe does not come with Windows by default and most importantly does not support creating symlinks to files (only directories) which causes a problem with quite a few Python packages. On NT6+ (Vista a...

How can I copy readonly files with deep paths and preserve the file time metadata?

The task that I'm trying to handle is to create a set of wrappers around WINAPI to handle various file modifications for files with deep paths in Windows. Currently, I copy files using WINAPI call prefixed with "\\?\" as suggested here. After copying the file, I'm using the file time metadata (created, accessed, modified) from the or...

Windows Server 2003 platform SDK

Hello everyone, I am using Windows Server 2003 x64 Enterprise with SP2 and I want to install platform SDK. But all I find is from here, and it is called Windows® Server 2003 SP1 Platform SDK. I am confused about SP1. For my platform, should I use this version of platform SDK or some other later version (I think there should be SP2 plat...

IIS cache with PURGE support

On Unix, I normally deploy nginx in front of Varnish in front of my application server. Both nginx and Varnish are acting as reverse proxies here. Varnish maintains a cache and supports things like If-Modified-Since, Cache-Control response headers and PURGE requests from the application. nginx is good at receiving a lot of connections. I...

Running Sybase SQL commands from DOS/Windows batch file

Is there any way I can run Sybase SQL commands from command prompt. I need to write a batch file which runs an SQL query on machine as a fix for a bug. ...

Start air/flex application with windows

Hello everybody, I want to provides an option in my air/flex application. A user can check an option and the application starts when windows starts. I don't find with google how to do this, someone knows do that ? Thanks. ...

Discover if user has Admin rights

How can I determine if the current user (the user running my application) has admin rights (i.e. is a member of the Administrator group)? I need to register some COM components differently for users with limited access. I am using C++ (WTL and Win32). ...

Run arbitrary subprocesses on Windows and still terminate cleanly?

I have an application A that I would like to be able to invoke arbitrary other processes as specified by a user in a configuration file. Batch script B is one such process a user would like to be invoked by A. B sets up some environment variables, shows some messages and invokes a compiler C to do some work. Does Windows provide a stan...

How to run ShellExecute on shell object clsid ?

Shell explorer on Windows define global objects such as ::{2559a1f4-21d7-11d4-bdaf-00c04f60b9f0 which is a link to the user "internet browser". I got these value from a shortcut that is drag&dropped over my application, but I can't find how to use it to open it... I'd like to get information about what this object is too. Does someo...

WindowProc For a form in c#

Hi, I how to get the windowproc for a form in c# for .net compact framework 3.5, i want to know how to get the window proc of particular form. By default we cant overide the window proc of a form in c# 3.5 compact, please let alternate method to get the windowproc ...