windows

Batch file variables initialized in a for loop

I have a batch file which initializes variables via SET inside a for loop, for a set of files on disk: for %%f in (%MYTARGETDIR%\*config.xml) do ( SET TMPFILE=%%F.tmp echo In loop %TMPFILE% ) echo End loop %TMPFILE% when I run this in a brand new command shell (without TMPFILE defined) the In loop echo is empty, but the end loop...

Taking a snapshot from the command prompt for Hyper-V 2008.

Background: I am using Hyper-V on Server 2008 to manage many virtual servers. I have scripts that have been built to make changes or apply updates to some or all of these virtual servers. Using the Hyper-V Manager, I am able to snapshot these virtual servers prior to doing an update, then roll back the changes if there is a problem. ...

Windows Registry best practices

In what way is the Windows registry meant to be used? I know it's alright to store a small amount of user preferences, but is it considered bad practice to store all your users data there? I would think it would depend on the data set, so how about for small amounts of data, say, less than 2KB, in 100 or so different key/value pairs. Is ...

Windows Mobile datagrid

I am developing a Windows mobile application. How can I show only two columns of the twelve in my datatable in the grid?. Also, is it possible to delete rows in the Windows Mobile datagrid? Please provide sample code. Hi StartClass0830, Thanks for your reply, i don't want remove the columns in my grid, Let's say In ...

checkbox validation in windows mobile

Hi, In the windows mobile application how i am validate the checkbox. for example: I have two checkboxs A,B If i checked the A checkbox, B checkbox is Unchecked and If i checked the B checkbox A checkbox is unchecked I struggling couple of days plz help me how i am solve it. Thanks brite ...

Windows mobile datagrid certain fields only displayed and delete rows

Let's say In the windows mobile application i select all the fields of a table from database and i want to display certain fields in datagrid after i want delete certain rows only. Can anyone tell me how to do it? plz provide sample code Thanks brite ...

How can I calculate a grand total in a Windows Mobile datagrid?

How can I calculate a grand total in a Windows Mobile datagrid? For example: ItemID Price qty total 1 5 2 10 2 3 3 9 -------- 19 ------- ...

How do you programmatically resize and move windows with the Windows API?

How do you programmatically resize and move windows with Windows API? The scenario is: I want to vertically tile two windows (80%/20% width proportions). ...

Is it possible to start a new process and set it's main window as a child window of my MDI application?

Is it possible to start a new process and set it's main window as a child window of my MDI application? The scenario is: I have a MDI application and I want to start Adobe Acrobat as a child window of my MDI application. ...

How to force delete a file?

How can i force Windows XP to delete file that is currently being used by some application? ...

What subversion clients for Windows are there that do not need installation?

A colleague of mine agreed to using SVN for our little project, but only if he doesn't have to install it. He has a U3 USB stick where he keeps the project files and he would like the SVN client to live there as well. I tried searching for a non-installable SVN client, but couldn't find anything (although I suspect that many of the avail...

Controlling psftp in a Windows Batch File

How do I write a batch file to control psftp, but with a dynamic filename? Overall I'm trying to convert a video file and then upload it to my Apple TV. Here's what I have, it generally works, but the commands don't control psftp, psftp just waits for user input: echo Convert and Upload to Apple TV file Called %1.mkv ffmpeg -i %1.mkv -...

Setting Library path for win32 console applications

Hi, I am getting "dll not found:restarting the application may fix the problem" error when i try to execute a simple "HelloWorld" win32 console application. I know the location of the .dll. How to specify its location when executing the .exe from command prompt? PS: copying the .dll to the .exe's current dir seems to solve the problem,...

how to hook to events / messages in windows using python

in short: i want to intercept suspend/standby messages on my laptop, but my program doesn't receives all relevant messages. background: there's a bug in ms-excel on windows xp/2k, which prevents system suspend if a file is opened on a network/usb drive. i'm trying to work-around it programmatically (my toolbox include python, vb6, or...

How to debug a shared library using eclipse/gdb on Windows?

At my university we are currently developing a VST-Plugin on Windows using open source tools. My professor is pretty fond of Microsoft Visual Studio and rather sceptic towards open source tools such as Eclipse, GCC, Subclipse etc. However, until now I was able to solve all of his problems and it would be a shame if he could not be con...

"Spy++ has encountered a problem in the message hook"

I am deep in the middle of troubleshooting some Windows API messaging problem and I find that Spy++ is not working anymore. It doesn't even work on Notepad. On some occasions, it brings up this message: --------------------------- Microsoft Spy++ --------------------------- Spy++ has encountered a problem in the message hook. To preven...

APC for windows alternative download

I am trying to install APC on windows but the site http://pecl4win.php.net/ is down for a while now with the message: The pecl4win build box is temporarily out of service. We're preparing a new build system. Is there an alternative download for this ? Or can anyone share theirs ? ...

How do I hook the TCP stack in Windows to sniff and modify packets?

I'd like to write a packet sniffer and editor for Windows. I want to able to see the contents of all packets entering and leaving my system and possibly modify them. Any language is fine but I'd like it to run fast enough that it won't burden the system. I've read a little about WinPcap but the documentation claims that you can't use ...

Beginning C++ problem; cannot instantiate abstract class (C2259 in VS)

I'm attempting to create a concrete instance of the IAudioEvents COM interface (available in Vista and later). This is my first foray into COM programming, so I'm probably just doing something stupid here. Anyway, the following code fails to compile with "C2259: 'AudioEndpointVolumeNotifierImpl' : cannot instantiate abstract class". C...

Periodic Windows Server Based Processes

I have some custom programs I've written to do various maintenance/monitoring tasks that I run periodically (some every few minutes, some as little as once a day). Is it a better practice to run them out of the task scheduler, or to run them as a windows service (triggered by an embedded timer object)? ...