February 23rd, 2011
It has been some weeks ago when I needed to find a way to make to be executed with full rights. There are several reason why you got to do so e.g. get write-access to C:
It was my aim to show that nice UAC Dialog from Windows itself when the rights are needed.
And this is how it works:
Create a manifest for you executable which is simple xml:
<?xml version="1.0" encoding="utf-8" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="yourApp"
type="win32" />
<description>Your App Description</description>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"><security>
<requestedPrivileges>
<requestedExecutionLevel level="requireAdministrator" />
</requestedPrivileges>
</security>
</trustInfo></assembly>
this is the important line:
<requestedExecutionLevel level="requireAdministrator" />
Now you can rename it to (YourApp).manifest. The .NET Framework when executing the file will see the Manifest and handle its contents.
Or you can, which I regard as better, embed the .manifest file into you executable.
mt -manifest YourApp.exe.manifest -outputresource:YourApp.exe
The mt.exe come with Visual Studio SDK which can be downloaded at Microsoft’s.
To simplify this I created a Post-Build event which looks like this:
“C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\mt.exe” -manifest “$(ProjectDir)$(TargetName).exe.manifest” –outputresource:”$(TargetDir)$(TargetFileName)”;#1
An important note:
If your assembly is strong named, you will be unable to embed the manifest into it as it would invalidate the strong naming.
Some source:
Every assembly, whether static or dynamic, contains a collection of data that describes how the elements in the assembly relate to each other. The assembly manifest contains this assembly metadata. An assembly manifest contains all the metadata needed to specify the assembly’s version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE file that contains only assembly manifest information. (http://msdn.microsoft.com/en-us/library/bb756929.aspx)
October 29th, 2009
If you need to get a crashdump running Windows Vista you’ll look for DRWTSN32.EXE for ever and a day. Unfortunately, it’s in vain, Dr Watson died…
Nevertheless that app has been very important for collateral quality control.
Vista has increased the intricacy of everything a lot. In general Vista is not saving minidumps, but keeps account of every crash or error report. If an app is WER registrated a crashdump is stored as well - if it’s not no crashdump is at dumpfolder. Neither here nor there.
This is how it works on Vista (as fair as I could figure out):
- WER just makes a crashdump for WER signed apps respectively if the WER server requests a report
- To get a minidump the following regesty value has to be set:
HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting\ (DWORD) create a key named “ForceQueue” and set it to 1.
- Dumps are getting stored in user directory C:\Users\TheUserName\AppData\Local\Temp and C:\ProgramData\Microsoft\Windows\WER\ReportQueue. File extension is *.mdmp.
- You can have an overview at Control Panel-> maintenance -> Problems & Solutions -> Check Problems
You also can find several instructions on the web howto install Dr Watson on Vista. There also seems to a tool called DrVista that might help you - which I didn’t try…

July 15th, 2008
The Google C++ Testing Framework known also as Google Test, based on xUnit has been used by many of the Google C++ developers to help in unit testing their C++ applications. It is portable and works on Linux, Windows, Mac etc with GCC and MSVC compilers and even embedded systems. You can even use it to kill your Linux applications so that they die as you expect them to. Or have it continue testing after non-fatal errors. Now they have made it available as an open source library.
Google doesn’t claim that their test framework is better than others but they have made it easy to extend it by adding new test macros. You can read more in the primer and faq.
Link: Google C++ Testing Framework
June 18th, 2008
One of the greatest mysteries to me is why most file managers don’t have tabs - it makes performing tasks so much simpler.
Iâve found a lightweight file manager for Debian called PCMan that gives you most of the functionality from Nautilus, but also has tabs. To install this file manager, you can either use the built-in Add/Remove applications dialog or use the command line.
Install it with apt-get:
Once itâs installed, you can find it under System Tools \ PCMan File Manager.

The current version is 0.3.5.10, which was released on February 14th 2008.
Its web reference is pcmanfm.sourceforge.net, which indeed looks a bit weird.
June 16th, 2008
Today I found a really nice program for long-running console commands: pv, aka “Pipe Viewer“.
If youâve ever strung together a long command with pipes, run it, questioned why itâs taking so long, maybe open another terminal to run top⦠pv is the answer to that question.
Itâs very similar to tee, except instead of sending a copy of the data to a file, it displays one or more progress meters on the screen so you can see the flow of data through your piped commands.
It can be easily installed via apt or downloaded on the official website as RPM.
The usage is very simple. If you like to compress a file and show the progress visually you can do it this way:
pv big.iso | gzip > big.iso.gz
50.3MB 0:00:05 [11.6MB/s] [=====> ] 33% ETA 0:00:09
In the manual you can find some more, also very complex examples such as this more complicated example using numeric output to feed into the dialog program for a full-screen progress display:
pv file | nc -w 1 somewhere.com 3000
(tar cf - . \
| pv -n -s âdu -sb . | awk â{print }ââ \
| gzip -9 > out.tgz) 2>&1 \
| dialog --gauge âProgressâ 7 70
You should mention that the program is aborted if a numeric option, such as -L, has a non-numeric value.
April 6th, 2008
Every time I have occasion to look at the Windows command line documentation, I seem to discover something new. Admittedly this is because I don’t really look for new stuff all that often…
The year’s discovery for 2008 might be Pathping which is a Windows based command-line tool (for Windows cmd) used to provide information about the path data takes to its intended destination, network latency and network loss at intermediate hops between a source and destination.
It’s a TCP/IP based utility that can be used when looking for errors in network. It does this by sending echo requests via ICMP and analyzing the results. ICMP stands for Internet Control Message Protocol. ICMP is an extension to the Internet Protocol (IP - part of the TCP/IP protocol suite). ICMP supports packets containing error, control and informational messages.
Like tracert, pathping will discover the route IP traffic will currently take to from your machine to a particular target on the internet, and how long each hop takes. But while tracert just shows you three samples for the timing to each hop, pathping runs for a few minutes, and sends out a much larger number of packets - 100 per hop by default. It then displays the average performance and packet loss for each hop in the chain. Since timing and packet loss can vary quite widely, three samples often isn’t enough to characterise the quality of your connectivity, so pathping can give a better picture of network health between distant machines.
A sample output could be:
pathping -n server
Tracing route to server [10.1.1.5]
over a maximum of 30 hops:
0 10.1.2.1
1 10.1.1.1
2 10.1.1.5
Computing statistics for 50 seconds...
Source to Here This Node/Link
Hop RTT Lost/Sent = Pct Lost/Sent = Pct Address
0 10.1.2.1
0/ 100 = 0% |
1 35ms 0/ 100 = 0% 0/ 100 = 0% 10.1.1.1
13/ 100 = 13% |
2 28ms 16/ 100 = 16% 3/ 100 = 3% 10.1.1.5
0/ 100 = 0% |
Trace complete.
PathPing is supplied in Windows NT, Windows 2000, Windows 2003, Windows XP and Windows Vista.
Finally it’s nothing spectacular that can’t be archieved otherways but it will ease your work in some cases.