windows

Starting an application under windows using start

I noticed that I can start a program with it's associated handler by writing start filename. However, for some files, all I get is a console, and I don't know why. I'm trying to populate a list control in MFC, and I want to have the program and it's associated handler to run when I double click the selection. Is there a better way, or an...

Vim: \n vs. \r

I haven't used vim in a Unix system in a while, but as I recall there was no \r, it was always \n. I'm using gVim under windows and when I search for new line characters I use \n. Searching for \r returns nothing. But when I replace the characters I have to use \r's. \n's give me ^@ Can anyone explain what's going on here? ...

Can I have multiple php.ini files?

I want to set the include_path variable in my php.ini file. (C:\Windows\php.ini) But, I want different include_path values for different sites hosted on the same Windows server. How can I do this? ...

git-svn on Windows. Where to get binaries?

Hi, I want to use git as a local repository against a remote SVN repository. I installed version 1.6.0.2 from http://code.google.com/p/msysgit/downloads/list. According to the documentation synchronization is done via the command git svn or a separate command wrapper called git-svn Neither of them is available in my installatio...

How to make my program DEP-compatible?

I have a windows forms (.net 3.0) project that won't run on my customer's vista computer due to a DEP error. It runs on my vista machine, and in a clean version of vista sp1 in a virtual machine. I am having trouble tracking down ways to make my program DEP, Data Execution Prevention compatible. I really can't do anything to end user mac...

Find OS Name/Version using JScript

I have to maintain a server-side script written in JScript (NOT Javascript) that needs to discover the OS of the system that it's running on. How can I do this correctly and robustly? ...

how do i start a program (say calc.exe) based on existence of some file (1.htm) via scheduler?

Hi, I need to start a program based on existence of some file (1.htm) on the same machine using scheduler. I don't want to write any extra code. is it possibele by using that is already on windows for e.g listener etc. 1.html sometimes exist and doesnt' exist sometimes. So strictly I need to run (calc.exe) only when 1.htm exists. Basi...

How to cancel the 'system key down' state in Windows

In Windows, when you press Alt, and release it again, the menu bar gets activated. However, when you press Alt, then click, then release, the menu bar does not get activated because presumably you wanted to Alt+click, not activate the menu bar. I want to support Alt+mouse wheel changes (which would map to horizontal scrolling). This wor...

Command line tool to find Dll dependencies

Does anybody know a command line tool to recursively find a DLL dependencies? I tried dumpbin and depends that come with Visual Studio 2005, but dumpbin only finds the first level of dependencies, and depends output is not really computer friendly. ...

How to test whether a service is running from the command line

I would like to be able to query whether or not a service is running from a windows batch file. I know I can use: sc query "ServiceName" but, this dumps out some text. What I really want is for it to set the errorlevel environment variable so that I can take action on that. Do you know a simple way I can do this? UPDATE Thank...

.NET Winforms: Can the runtime dispose a form's handle out from under me?

The current declaration of SendMessage over at PInvoke.net is: [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)] static extern IntPtr SendMessage(HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam); Note: The hWnd is no longer an IntPtr, and has been replaced with HandleRef. A very loose explanation fo...

Gettings started with Ruby on Rails 2.0 for Windows

So like many people, I'm excited about Ruby on Rails. Being a Windows user, I downloaded InstantRails, got it going, and followed along with the screencast on how to make a blog with RoR 2.0 in fifteen minutes. I used Notepad++ as my text editor, because that's what I've traditionally used for writing the PHP-based websites I've done in ...

Windows Centralized Configuration for third party applications?

Hi, We are looking at a standard way of configuring the various "endpoints" of our application. Our application is a distributed system with Windows Desktop applications, Windows Server "services" and databases. We currently configure each piece using XML files. This is getting a little out of hands as we work with larger customers who ...

How to create a folder which listens for changed files or new files

I have a requirement where I create many swc files (swc files are similar to zip or jar files). I want that, whenever I create a new swc file and add it in a "particular folder" then these files should automatically get extracted (similar to what happens in Apache Tomcat webapps folder). Please help me how to do that in Windows. [Note: ...

How can I determine when control key is held down during button click

How can I determine when the control key is held down during button click in a C# Windows program? I want one action to take place for Ctrl/Click and a different one for Click. Thank you ...

How do I find out which computer is the domain controller in Windows programmatically?

I am looking for a way to determine what the Name/IP Address of the domain controller is for a given domain that a client computer is connected to. At our company we have a lot of small little networks that we use for testing and most of them have their own little domains. As an example, one of the domains is named "TESTLAB". I have a...

convert bitmap to byte array

How can I convert a bitmap to a byte array in c++ WITHOUT the .net framework? ...

Open in Explorer

How do you open a path in explorer by code in c++. I googled and couldn't find any thing but systems commands to do this, however, i dont want it to block or show the console window. ...

How do I create a certain control using Windows Forms in Visual C++?

I am new to using Windows Forms in C++ (and just in general), and I am not exactly sure of the name or if it's even possible to do. Currently I am currently working on a school project in which we must make a program for an imaginary bookstore. I am trying right now to make a sort of list that shows what the "customer" is buying. I hav...

scale9Grid in haXe on image imported with swfmill

I'm trying to use scale9Grid in haXe on an image that I imported with swfmill. border = flash.Lib.attach("BorderPic"); border.scale9Grid = new Rectangle(15, 15, 1, 1); The second line generates the following runtime error: ArgumentError: Error #2004: One of the parameters is invalid. at flash.display::DisplayObject/set scale9...