I'd like to write a batch file that checks to see if a process is running, and takes one action if it is, and another action if it isn't.
I know I can use tasklist to list all running processes, but is there a simpler way to directly check on a specific process?
It seems like this should work, but it doesn't:
tasklist /fi "imagename e...
I would like to find the full path to a program in Windows. Is there an equivalent to the UNIX command 'which'? On UNIX, which command prints the full path of the given command.
...
Hi,
I'd like to "reserve" a portion of the screen so that maximized windows don't cover that area (think taskbar(Win) or dock(mac).
I've seen other programs that have done this, but really have not liked them and since I'm in the business, thought I might have a hand at it... at least for my personal use.
I prefer to use a VS supporte...
Unfortunately I don't have access to a *nix box at work or at home. The only way I can play with Haskell is on windows. Anyone here using Haskell on Windows? What's your setup?
...
I have a GSM modem connected via USB. The modem creates 2 serial ports. The first is automatically attached to the modem, the second shows in Device Manager as "HUAWEI Mobile Connect - 3G PC UI Interface (COM6)"
The second port is used to get vital information from the modem, such as signal quality; to send and receive text messages; ...
I'm trying to build a console application without using the CRT, or any other imports than kernel32.lib in any case. I get my code to compile, but can't wrap the linker around a few problems:
unresolved external symbol @__security_check_cookie@4
unresolved external symbol "int __cdecl FreeLibrary(void *)" (?FreeLibrary@@YAHPAX@Z)
unreso...
I have a binary file - Windows library (*.lib).
Is there a simple way to find out names of the functions and their interface from that library?
Please adivise smth similar to emfar and elfdump utilities.
...
I created a simple batch file (.bat) containing a bunch of commands to be triggered automatically into the command window. The batch looks like this:
mmd dll1.dll -mf -aW
mmd dll2.dll -mf -aW
mmd dll3.dll -mf -aW
If I copy and paste the bunch of cmds into the command window, they are all correctly executed. However, if I try to direct...
My application caches some data on disk. Because the cache may be large, it should not be stored on a network drive. It should persist between invocations of the application. I have a mechanism for the user to choose a location, but would like the default to be sensible and "the right thing" for the platform.
What is the appropriate ...
I would like to be able to create a black custom window (with border and controls) like that shipped as part of expression blend, Twirl, or Adobe Lightroom.
Is there a best practices way of creating an owner drawn window?
Platform: C# and WindowsForms (any version)
...
Hi,
I have the following command which will loop over all the subdirectories in a specific location and output the full path:
for /d %i in ("E:\Test\*") do echo %i
Will give me:
E:\Test\One
E:\Test\Two
But how do I get both the full path, and just the directory name, so the do command might be something like:
echo %i - %j
And t...
I am in a Windows Desktop application and I have a data stream and a mime type in the database. Is there a better way than writing it to a temp folder and launching the default editor for it?
If I have to use the temp folder how can I get the file extension from the MIME type in a C# Windows Desktop application?
...
Obviously it gets updated during a write operation, but are there any non-destructive operations that also force an update? Basically looking to be able to do the equivalent of the *nix touch command, but in C# programmatically.
...
When I run a wxPython application, it prints the string Redirecting output to win32trace remote collectorand I must open PythonWin's trace collector tool to view that trace output.
Since I'm not interested in collecting this output, how should I disable this feature?
...
I want to store a URL prefix in an Windows environment variable. The ampersands in the query string makes this troublesome though.
For example: I have a URL prefix of "http://example.com?foo=1&bar=", and want to create a full URL by providing a value for the bar param. I then want to launch that url using the "start" command.
Addin...
Background
I have an application written in native C++ over the course of several years that is around 60 KLOC. There are many many functions and classes that are dead (probably 10-15% like the similar Unix based question below asked). We recently began doing unit testing on all new code and applying it to modified code whenever possibl...
Hello,
I find myself running scripts and copy-pasting the output of these runs into emails or into some other documents. Is there a way such that I can make the copy-to-clipboard step a part of the script itself? Most of my scripts are either perl or bat files and I work on windows.
Thanks,
Rohit
...
Hosting a WCF Service Host in a Windows Service really seems to be quite a simple way to go to communicate with a running Windows Service...if you're running 3.0/3.5.
What the easiest way to get the same sorts of things out of the 2.0 Framework if that's what you're stuck with?
...
I have a few things that I cannot find a good way to perform in Visual Studio:
Pre-build step invokes a code generator that generates some source files which are later compiled. This can be solved to a limited extent by adding blank files to the project (which are later replaced with real generated files), but it does not work if I don...
I have an application that can list the opened windows of the current session. It uses the EnumWindows method from the user32.dll.
I would like to run this code from a windows service, but as the service is not attached to a user session, it returns nothing obviously.
So the question is, how can I enumerate the open windows of another ...