%1 is not a valid Win32 application PHP & Windows Server 2003 64bit

If you are getting error, chances are you are trying to run a 32-bit PHP within IIS on a windows server  2003 (64bit) server or later.

“If you plan to run 32-bit applications on 64-bit Windows, you must configure IIS to create 32-bit worker processes.”
http://blogs.technet.com/b/mbaher/archive/2006/12/17/running-iis-32-bit-applications-on-iis-64-bit.aspx

To fix this error you have to do one of the followings:

1. The best way is to run PHP native 64bit version
Find a  64 bit PHP and use it (chances are it is not going to be the latest).
http://www.iis-aid.com/

2. The Other way
Configure IIS to create 32-bit worker processes and run the 32 bit version
http://blogs.technet.com/b/mbaher/archive/2006/12/17/running-iis-32-bit-applications-on-iis-64-bit.aspx
http://support.microsoft.com/?id=894435


Other References
http://www.iisadmin.co.uk/?p=14

Dreamweaver not searching custom extensions

Dreamweaver may not search your custom extensions (.inc, .lib) files if the extensions are not added to the Extensions.txt file.  If you are reading this, you will need to add your custom extensions to the Extension.txt file.

Here is how to Locate this file:

“To add file types to the Extensions.txt file:
Locate the Extensions.txt file within the Dreamweaver user configuration folder. The location of this folder depends on the operating system and the version of Dreamweaver:
  • Dreamweaver CS3 on Windows Vista: C:\Users\[username]\AppData\Roaming\Adobe\Dreamweaver 9\Configuration
  • Dreamweaver 8 on Windows Vista: C:\Users\[username]\AppData\Roaming\Macromedia\Dreamweaver 8\Configuration
  • Dreamweaver CS3 on Windows XP: C:\Documents and Settings\[username]\Application Data\Adobe\Dreamweaver 9\Configuration
  • Dreamweaver 8 on Windows XP & 2000: C:\Documents and Settings\[username]\Application Data\Macromedia\Dreamweaver 8\Configuration
  • Dreamweaver CS3 on Mac OS X: Mac HD:Users:[username]:Library:Application Support:Adobe:Dreamweaver 9:Configuration
  • Dreamweaver 8 on Mac OS X: Mac HD:Users:[username]:Library:Application Support:Macromedia:Dreamweaver 8:Configuration "

Directly taken from this Page: http://kb2.adobe.com/cps/164/tn_16410.html

For Example,  i just added the .lib extension to my Extensions.txt File  (LIB  Upper Case)

Execute DOS From Windows Applications (C#)

Sometimes it is convenient to execute a dos script command from a windows application.  If you use C# doing so is not a big deal here is a sample code that should help execute or calling dos commands from a c#.net application:

System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents = false;
strCommand = @"/c   dir /w/a/p";
Process.Start("CMD.exe", strCommand).WaitForExit();
proc.Close();

I know you are probably saying that there are millions of web pages on the internet that give the same information. Well you are right, but the advantage of using ycsoftware.net is that all the codes are fully tested and supported.

What could go wrong with the above code?

The main thing that could go wrong is the DOS Command. How do you handle a space in a filename ? or how do you handle special characters?.  The Answer is: double quotes.

Let say you wanted to run this command.

wmaonly.bat  c:\\my document\yc software\net\m wma file.wma  c:\\mydocument\my new wma file.wma

How do you use the double quotes?

wrong:
@”/c wmaonly.bat  c:\\my document\yc software\net\m wma file.wma  c:\\mydocument\my new wma file.wma”

wrong:
@”/c ” + “wmaonly.bat  c:\\my document\yc software\net\m wma file.wma”  “c:\\mydocument\my new wma file.wma”

wrong:
@”/c ” + “wmaonly.bat ”  + “c:\\my document\yc software\net\m wma file.wma”  “c:\\mydocument\my new wma file.wma”

wrong:
@”/c ” + ‘”wmaonly.bat ”  + “c:\\my document\yc software\net\m wma file.wma”  “c:\\mydocument\my new wma file.wma”‘

right:
@"/c " + ""wmaonly.bat "  + "c:\\my document\yc software\net\m wma file.wma"  "c:\\mydocument\my new wma file.wma""

Note the double quotes