windows

How to capture and display output from a task via Windows CMD

Hi, I've got a PHP script which I'm running from a command line (windows) that performs a variety of tasks, and the only output it gives is via 'print' statements which output direct to screen. What I want to do is capture this to a log file as well. I know I can do: php-cli script.php > log.txt But the problem with this approach...

Creating a temporary directory in Windows?

What's the best way to get a temp directory name in Windows? I see that I can use GetTempPath and GetTempFileName to create a temporary file, but is there any equivalent to the Linux / BSD mkdtemp function for creating a temporary directory? ...

JVM Launched via CreateProcess() Loses Classpath Library

I launch the following command line (process) from a Windows VC++ 6 program using CreateProcess (or _spawnv()): java -cp c:\dir\updates.jar;c:\dir\main.jar Main and class updates in updates.jar (overiding some in main.jar) are not read or found. It is as if the updates.jar library cannot be found or read. If I launch the same line ...

How do I script an OLE component using Python?

I would like to use Python to script an application that advertises itself as providing an OLE component. How should I get started? I don't yet know what methods I need to call on the COMponents I will be accessing. Should I use win32com to load those components, and then start pressing 'tab' in IPython? ...

Is MSDE supported on Windows Server 2008?

I know MSDE is no longer supported on Vista, is this also the case for Windows Server 2008? ...

file path portability

I have a program that I need to run under *nix and windows. because the program takes file paths from files the issue is what to do about the \ vs / issue. My current thought is to put in a regex that converts the wrong one to the right one depending on what system I'm on. This will have the effect of letting either type work on either...

How can I use C to change the last modified date of a file in Windows?

Is there a C function call that can change the last modified date of a file or directory in Windows? ...

What is a "Cloud OS"?

The term is getting 'hotter' with Microsoft Azure and Windows 7. What are the benefits + how does the status quo of desktop computing now change? Does the machine no longer need an OS installation (or a highly stripped down version of a typical OS)... what is needed to interact with the 'Cloud' ? Update: Received my first RTFM on SO to...

What is the best usb library to communicate with usb HID devices on Windows?

The library should; -Be easy to use and few lines of client code should accomplish much -Be as platform independent as possible. (In case of future ports to other platforms) -Have C++ bindings. -Be mature and stable I would also like to be notified of most HID events through callbacks. I have considered the following alternatives: ...

How do I use PostThreadMessage to close internet explore from c++

Hi Im trying to start iexplore.exe let it run for 5 seconds and then close it again. iexplore opens just fine however it doest close when i call the PostThreadMessage can any one see what im doing wrong here is the code: CString IEPath = "C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE";//GetIEPath(); //IEPath += ' ' + url; std::st...

Increment version number in advanced installer

I read a little of the help for my advanced installer 6.5.1 and couldn't find a way to change the version string except by hand. ...

How do I rename a DLL but still allow the EXE to find it?

We have a DLL which is produced in house, and for which we have the associated static LIB of stubs. We also have an EXE which uses this DLL using the simple method of statically linking to the DLL's LIB file (ie, not manually using LoadLibrary). When we deploy the EXE we'd like the DLL file name to be changed for obfuscation reasons (a...

suppress autoplay

I need to suppress autoplay for the mass storage devices. This needs to be achieved programatically through a service/deamon running in the background. I know it can be done by an application which opens a window and handles the "queryCancelAutoPlay" message sent by windows. Can this be done without GUI.I have the guid/pid/vid for the ...

Ruby scripting on Windows

I'm making a simple script using ruby on a Windows 2003 Server. My questions are: How can I connect to a database through ODBC? I will be connecting to both Sybase on Solaris and MSSQL Server. How can I send emails through an Exchange Server 2003? Update What's the best simple IDE for Ruby scripting? I currently use SciTE (whic...

API for getting screen region changes?

I am writing a sort of screen-recording app for Windows and wish to know when and which regions of the screen/active window have changed. Is there a Windows API I can hook to get notified of screen changes? Or would I need to manually write something like this? :( I always figured that Remote Desktop used some sort of API to detect wh...

Windows batch - loop over folder string and parse out last folder name

I need to grab the folder name of a currently executing batch file. I have been trying to loop over the current directory using the following syntax (which is wrong at present): set mydir = %~p0 for /F "delims=\" %i IN (%mydir%) DO @echo %i Couple of issues in that I cannot seem to pass the 'mydir' variable value in as the search stri...

Has anyone tried their software with ReactOS yet?

The Free MS Windows replacement operating system ReactOS has just released a new version. They have a large and active development team. Have you tried your software with it yet? if so what is your recommendation? Is it time to start investigating it as a serious Windows replacement? ...

Has anyone out there succeeded in building Chrome under Windows?

I am quantitatively studying various metrics associated with automated tests. Chrome seems to have a reasonable set, so I wanted to add it to my data set. I downloaded the Chrome source code and tried to build it with VisualStudio but got several hundred errors--types not defined, identifiers not defined, etc. Has anyone out there succee...

How to increase mysqld-nt CPU usage

I have a pretty much default installation on mysql on Windows 2003. I am rebuilding some indexes and the process only seems to use 3-20% of the CPU. Is there a way to allow it to use more and speed up the process? ...

Open Explorer on a file

In Python, how to jump to file in Windows Explorer (like in Winamp)? I found a solution for jumping to folders: import subprocess subprocess.Popen('explorer "C:\path\of\folder"') but I have no solution for files. Please help. ...