The “CON” Folder

I just received a funny email today, reading:

TRY IT NOW , IT WILL NOT CREATE ” CON ” FOLDER.
YOU WON’T BELIEVE THIS !!!!!!!! An Indian discovered that nobody can create a FOLDER anywhere on the computer which can be named as “CON”. This is something pretty cool…and unbelievable… At Microsoft the whole Team, including Bill Gates, couldn’t answer why this happened!

TRY IT NOW , IT WILL NOT CREATE ” CON ” FOLDER.

What is funny about it is that people forward emails without research or verification.

As a programmer and as most programmers know, the “CON” is a special device name which stands for console. There are many other reserved devices names in the DOS/Windows OS, such as: AUX, NUL, LPT1, COM1, etc….

However, you would be able to create use such names if you pass a complete file as: “\\.\c:\con”. As an example, follow these steps:

  1. Start -> Run -> Cmd
  2. type: “notepad \\.\c:\con.”
  3. now go to “My Computer” -> “C:” and notice the file named “CON”
  4. Notice that you won’t be able to delete that file simply by selecting it and pressing DEL. If you ask why, it is because (again) Explorer is passing the name “CON” to the operating system’s DeleteFile() API and not its full name
  5. Now to delete this file, simply type “del \\.\c:\con.” in the command prompt

If you want another “CON” (console) trick, here’s one that allows you to create a text file without using notepad or any other text editing tools:

  1. Go to command prompt and type:
  2. copy con hello.txt
  3. start typing anything you want here, for everything you type here will go into the “hello.txt” file
  4. When you want to finish, simply press CTRL+Z (which will show as ^Z on the screen) and press ENTER

If you wonder what’s the CTRL+Z (aka ^Z) it simply marks the EOF (End Of file).

PHP5 on Vista 64 and IIS7

Hello,

The other day I wanted to install PHP the Vista 64 with IIS7, however IIS7 is totally changed and couldn’t get PHP to work without doing some research on how to use IIS7 and add PHP handlers to it.

At first, I found “How to install PHP on IIS7 (RC1) – BillS’ IIS Blog” excellent article describing how to get started.

However, after following the exact steps, PHP still failed to load, saying:
After some research it turned out to be that the ISAPI modules are for x86 (32bits) and this is why they are not being loaded.
For this reason you have to do these additional steps:

  1. Open IIS Manager and expand the root node
  2. Click on the “Applications Pool” node
  3. Notice you have “DefaultAppPool” and one more ¬†entry in the list
  4. Now to the right, select “Advanced Settings”
  5. In the “Advanced Settings” dialog, select “General: -> “Enable 32-bit Applications” and set to True (screenshot)

Now everything should be working.

While you’re here trying to fix your PHP / IIS7 installation, you might want to take a look at FastCGI a collaborative work between Microsoft and Zend.

More useful links:

What to choose 32 or 64 bits operating system?

Today I purchased a new PC (Intel 2.4GHZ Core 2 Duo, 3GB RAM), and knowing that this processor is a 64bit processor I got puzzled if Windows XP 32 or Windows XP 64 is better for me.

So what is a 64bit system

The most important difference is the addressing size: 32bits system allow you to access up to two to the power 32 bits of addresses, that is 4GB, whereas on 64 bit systems you can address 2^64 addresses.

If you wonder what does that mean, it simply means that your application can use more memory and can work with 64bit data natively (which is an advantage over working with 32bit data).
Mostly CAM and CAD software users can benefit from this memory addressing expansion.

Can I install 32bit Windows on a 64bit Machine

Yes. 64bit machines allow you to install 32bit Operating Systems on it. For this you may install two Windows on your machine: Windows XP and Windows XP 64. Then using the OS’s boot menu you can select which OS to run.

Most applications that run on 32bits run on 64bits

Most of the 32bit applications will continue running smoothly or even at a slight speed increase under Windows 64, and this is due to the WOW64 subsystem (Windows On Windows 64-bit, used to be WOW32 on 32bits systems).
Due to more addressing capacity, a Win64 system can allocate much more physical or virtual memory than a 32bit program. It is worthwhile mentioning that on 32bit systems, the maximum usable physical memory is 4GB while under 64bits you can reference up to 128GB.

Drivers need to be present for either 64bit or 32bit

You need to realize that the WOW64 does not work for drivers. For this reason you need to have a different driver version.
Because of this your CDROM burning software will not work anymore, neither your favorite AntiVirus. You need to download 64bit enabled version of that software.

No more 16 bit applications: DOS or Win 3.1

Windows 64 does not support 16bit applications anymore. However, don’t worry, you can still use virtualization software and run your favorite old program or game virtualized.

Reference

For an excellent reading, I suggest you take a look at Charlie Russel’s white paper for XP x64 (which also
applies to Vista x64), here:
Is Windows XP Professional x64 Edition Right for Me.

Other recommended links:

Scan for Virus using several AntiVirus programs

Have you ever scanned a file using your favorite AntiVirus (AV) program and found nothing, but yet you were infected?
Is your AV not up to date and not detecting everything?
You want to know the different names of the same virus?

If you answer is Yes, then VirusTotal.com is what you’re looking for. You can either send your suspicious file as attachment via email to scan@virustotal.com with the “SCAN” as subject, or you can simply upload the file using their online interface.

Speaking of OnLine file submission, did you check out BitDefender’s Online scanner?

Fear is the mind killer

I was watching “Dune” movie the other day, and the hero (Paul) was put to a pain test, and in order to take all that pain he recited this wonderful pain “mantra”:

I must not fear.
Fear is the mind-killer.
Fear is the little-death that brings total obliteration.
I will face my fear.
I will permit it to pass over me and through me.
And when it has gone past I will turn the inner eye to see its path.
Where the fear has gone there will be nothing.
Only I will remain.

I was surprised to find something about this quote as well on Wikipedia:

http://en.wikipedia.org/wiki/Litany_against_fear

Visual Studio and some useful keyboard shortcuts

Hello

I will present a short and handy list of useful keyboard shortcuts:

Key Meaning
*Make text selection then Shift+( This will surround the selected text with “(” and “)”
*Make text selection then Shift+{ Same as above but with { } surrounding
Ctrl+Ins/Shift+Ins To Copy / Paste (aka Ctrl+C/+V)
Ctrl+SPACE or Alt+RIGHT Toggle the autocompletion combobox
Ctrl+T To test a resource dialog
F12 When cursor is over an identifier, it goes to definition
Ctrl+- and Shift+Ctrl+- To navigate back and forth
Alt+F, J To go to Recently Opened Project

Hope you find them useful!

(*) You need Whole Tomatoes Visual Assist