The solution is even simplier: heaptrc doesn't handle quoted parameters correctly. You can solve the problem by specifying file log parameter WITHOUT quotes, i.e.: C:\ > set HEAPTRC=log=myheap.log C:\ > application.exe