Setup and Using RAM Disk in daily development

I have quite strong QuadCore computer with 8GB RAM. Normally, my daily working basis uses nearly 6GB RAM. So 2GB more are waste. I often have to write installer script, try/test the setup, installer … which read/write a lot of files (7000 files, WTH)

So idea about RAM disk (from DOS era) come up!

Software to create RAM disk

1. ImDisk. TESTed on Win7


3. I use this DataRAM RamDisk

Install it is very simple.

Create/Start new disk in DataRAM
go to Computer Manager, Disk Management, format it and assign drive letter, Fix the drive character to R: for easily reference later.

Settings/DiskSize set to your need
Load and Save/Load Disk Image at Startup, Filename = C:\RAMDISK.img
Load and Save/Save Disk Image on shutdown, Filename = C:\RAMDISK.img
Option/Do not compress image file on NTFS filesystems

Using your ram disk

Redirect Chrome cache dir

Change your Chrome shortcut, change the Target to

C:\Users\ngng\AppData\Local\Google\Chrome\Application\chrome.exe –user-data-dir=”D:\LockeVN\ChromeLockeVNWorkProfile” –disk-cache-dir=”R:\Google\ChromeDev”

Change Win7 temp path

Go to environment of OS, redirect TEMP and TMP folder to ramdisk


Disable Attach Security Warning in Visual Studio 2010


When debugging/attach to a process in Windows 7 from Visual Studio 2010, VS displays a warning message confirming if you want to attach to the process you just asked VS to attach to.

Of course I don’t click No Attach! because I do want to attach.


So, to save one mouse click and disable the warning,

1. go to windows Start/run, regedit

2. Go to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Debugger

3. and set DisableAttachSecurityWarning to 1



For VS 2008 the path should be



4. Restart Visual Studio


Thanks to: abjbhat



if you cannot alter the key HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\Debugger, DisableAttachSecurityWarning to 1, then

Delete it

Go to HKEY_LOCAL_MACHINE\Software\Microsoft\VisualStudio\10.0\Debugger

Create new DWORD, name it DisableAttachSecurityWarning , set value to 1


Fatal error and cannot boot after install Windows 7 SP1 RTM

After installing Windows 7 SP1 RTM, your computer probably cannot boot, and it shows

fatal error c0000034 (*) applying update operation 282 (**) of 115544 (***)

(*) (**) (***) can be different in your case.


I found a solution from here

Thanks to thiswoot. His method works without Safe Mode, without backups, without System Restore, without DISM, and without a Windows 7 DVD repair disc.


  • Reboot (or turn off/turn on) your computer
  • Try to go to Command Prompt (the step may be different, but it always exists a button to go to Command Prompt):
  • When your computer’s starting up, choose the option "Launch Startup Repair"
  • When the Startup repair starts, click cancel.
  • Click the link "View advanced options for recovery and support"
  • In the new window click Command Prompt at the bottom.


  • (Optional): if your computer using VHD image to load Windows, please mount the VHD file first, then change to that drive
  • type bcdedit, enter, to get the VHD file path, copy it (E.g.: c:\win7.vhd)
  • type diskpart, enter
  • type select vdisk file="c:\win7.vhd" , enter (use the VHD path in previous step)
  • type attach vdisk, enter
  • type list volume, enter. You will see you "real" Windows volume drive ————> (E.g.: I:)
  • exit diskpart


  • In Command Prompt type this and press enter: notepad C:\Windows\winsxs\Pending.xml (or whichever drive Windows is installed on. E.g.: if you mount VHD image and list volume, your Windows drive can be I:, replace C: with I: ———-> the command will be notepad I:\Windows\winsxs\Pending.xml). It can be very slow (because that file is very big)
  • Save as Pending.xml to another location (E.g.: save as Pending.OLD.xml), close Notepad.
  • Re-open pending.xml again with command notepad C:\Windows\winsxs\Pending.xml (It can be very slow (because that file is very big))
  • Press CTRL+F and search for the following exactly: 0000000000000000.cdf-ms
  • Delete the following text (yours will be a little different):

<DeleteFile path="\SystemRoot\WinSxS\FileMaps\_0000000000000000.cdf-ms"/>
<MoveFile source="\SystemRoot\WinSxS\Temp\PendingRenames\e56db1db48d4cb0199440000b01de419._0000000000000000.cdf-ms" destination="\SystemRoot\WinSxS\FileMaps\_0000000000000000.cdf-ms"/>


  • Save the file (very slow), close notepad
  • Exit command prompt, restart your computer.


  • Do a normal startup, Service Pack installation process can be continued or reverted, it depends, but let it be. Your computer can boot to Windows again

Configure XDebug with WAMP and NetBeans IDE 6.8 on Windows 7

This is step – by – step procedure (with sample):

  1. Install WAMP, default location is at c:\wamp
  2. Download latest release of xdebug for PHP version you are using.
    1. I use WampServer 2.0i [07/11/09] and it includes :
      – Apache 2.2.11
      – MySQL 5.1.36
      – PHP 5.3.0 ———> 5.3 is what we need
    2. write a phpinfo() to know what PHP compiled, Find “PHP Extension Build”  ———–>   API20090626,TS, VC6 is what we need
    3. I use Windows 7 64bit, there is nothing 64bit at XDebug (at the moment Apr 2010)  —–> so this is not important
    4. After all, this is what we should download from Xdebug: 5.3 VC6 (32 bit)   ———-> we have php_xdebug-2.0.5-5.3-vc6.dll
  3. Copy php_xdebug-2.0.5-5.3-vc6.dll file into php’s extension directory, it is c:\wamp\php\ext
  4. Now open php.ini (click WAMP tray icon, PHP/php.ini), we need to configure xdebug so that it get recognized by PHP
  5. Add following at the end of your php.ini
  6. [xdebug]
    xdebug.profiler_output_dir = "c:/wamp/tmp/xdebug"
    xdebug.profiler_output_name = "cachegrind.out.%p"
    xdebug.profiler_enable = 0

  7. Just create   c:\wamp\tmp\xdebug folder.
  8. Finally restart Apache service .
  9. Now you can write PHP code and debug with NetBeans