8. May 2008 19:22
As I'm working in my virtual MOSS environment using the stsadm.exe utility I am suddenly presented with an error:
C:\Program Files\...\STSADM.EXE is not a valid Win32 application.
After several more attempts at using the stsadm.exe utility and receiving the same error each time I stare at my screen… blankly. The error continues after I restart IIS. The error continues after I reboot the server.
I traversed to the 12-hive's bin directory to take a look at the stsadm.exe utility's security permissions. But, before I even view the security permissions I notice that the stsadm.exe file no longer has the Windows logo as its icon. Something is amiss. Upon closer inspection, the size of the file is 0KB!
The stsadm.exe file has become corrupted.
Grab an stsadm.exe file from another SharePoint environment and copy it over to the corrupted environment. Fixed!
I'm not sure how the stsadm.exe became corrupted. One minute I was running commands such as "stsadm.exe –o createsiteinnewdb <snip>", and the next minute Windows is telling me that "stsadm.exe is not a valid Win32 application." I tried to reproduce the error, but was unsuccessful. For now, this is being logged as an unknown bug.
If anyone else has encountered this error and/or has been able to reproduce it, please do post a reply.