Category Archives: Tech

CPU not compatible – Windows 8. Enabling the non-executable (NX/XD) flag.

So you have decided to try out a release preview of Windows 8! But on install it throws up an error stating –
“Your PC’s CPU isn’t compatible with Windows 8”
This usually means that the NX (Non-eXecutable) bit is not set.

Here is how you can go about fixing it.

Step I. Check if your CPU supports the Non-eXecutable flag.

Download and run coreinfo.exe

Running coreinfo will show you information on your PC’s cpu. Check here for an entry NX or 😄 flag. If present, your cpu does support NX flag. Yippie!!!.

Step II. Try enabling the NX/ 😄 flag using BIOS

  1. Restart your computer and go to the BIOS settings.
  2. Open the Security tab.
  3. Check for the NX or RX flag and enable it.

Step III. To enable the NX/ 😄 flag (using Windows settings – Win 7/ Vista)
If there is no option to enable the offending flag using your BIOS settings, you can try and from your existing Win 7 or Vista (provided that’s present on the computer you are trying to install Win 8 on). Here’s how –

Open up the ‘Performance Options’ window by

  1. Right Click ‘My Computer’
  2. Go to Properties, this brings up the Control Panel\System and Security\System window.
  3. Select ‘Advanced System Settings’, this brings up the ‘System Properties’ window
  4. Go  to the ‘Advanced’ tab. Click the ‘Settings’ button on the Performance panel, this brings up the ‘Performance Options’ window.
  5. Go to the ‘Data Execution Prevention’ tab.
  6. Select the option to ‘Turn on DEP for all programs’

Setting the NX bit in Win 7/ Vista

Restart your PC for the settings to take effect.

 

 

 

Drop a sql server database by killing all associated processes

 

To drop a sql server database using a script, it is required that there be no open sql processes referencing the database else you get the error

Drop failed for Database  northwind.  (Microsoft.SqlServer.Smo)

Cannot drop database “northwind” because it is currently in use. (Microsoft SQL Server, Error: 3702)

In order to avoid this error you can use the following script that detects and kills all processes associated with the database

 

go back to where we came from – pushd popd

For those few who still write dos batch file, a couple of invaluable commands are pushd and popd. Many a time, we need to change the folder within a script and then go back to the previous folder. Pushd and Popd enable you to do just that. For. e.g. say you started your command shell using the ‘cmd’ command line, it opens up in the default location.  Now instead of changing directories using the ‘cd’ command, you change them using ‘pushd’. This causes the folder to be pushed on to the folder history stack. You can then quickly go to top folder in the stack using ‘popd’. The following screenshot illustrates this

1

Another slick feature of ‘pushd’ is the ability to temporarily map a network folder to a local drive. A temporary drive letter is allocated to the network folder. This drive letter is then deleted when the corresponding ‘pop’ is done.

2