@Bloodline
It was a brilliant idea, and a similar (but more advanced) idea can be found in both nextstep and MacOSX with their bundles/packages respectively.
I was thinking about this a bit this morning, and Windows 7 provides an easy way to emulate the basic launch behavior of Mac OS bundles. Create a directory, e.g. MyApp (or My App--spaces are OK), and put all of your application's goodies in that directory:
MyApp\
MyApp.exe
dependency1.dll
dependency2.dll
data1.dat
data2.dat
In MyApp, create a Desktop.ini text file with the following contents:
[.ShellClassInfo]
DirectoryClass=MyAppBundle
IconResource=MyApp.exe,0
You can add additional Desktop.ini values to further customize shell behavior. Strings in Desktop.ini can be localized. You can also set the read-only and system attributes on the Desktop.ini file to hide the file under Windows Explorer's default view settings, but it's not necessary.
Set the read-only attribute on the MyApp directory.
Add the following values to the registry (no snarky comments from the registry naysayers) ("@" is the key's default value):
[HKEY_CLASSES_ROOT\MyAppBundle]
@=""
"CanUseForDirectory"=""
[HKEY_CLASSES_ROOT\MyAppBundle\shell]
[HKEY_CLASSES_ROOT\MyAppBundle\shell\openDesktopIni]
@="Run"
Note: This can be localized.[HKEY_CLASSES_ROOT\MyAppBundle\shell\openDesktopIni\command]
@=
Where is of type REG_EXPAND_SZ and equal to:
rundll32.exe shell32.dll,ShellExec_RunDLL "%1\MyApp.exe"
You can any value you want in place of "MyAppBundle." Apple-style identifiers, e.g. com.Spacely.Sprocket, work just as well. It's nothing more than a unique text identifier.
The default action on the MyApp directory is now "Run," which runs MyApp.exe. The directory can be moved anywhere, and as a long as you've obeyed Windows guidelines for local execution and use of side-by-side components, everything will work just fine.
A more generalized approach to bundles could treat all directories with the .app extension as special, using shell extensions to manage behavior in ways mostly identical to Mac OS bundles. This approach would work on earlier versions of Windows.
(My primary reason for writing this was to have something useful show up when folks search for CanUseForDirectory, which is only very briefly mentioned in the Windows SDK documentation. The only Windows component on my system that makes use of CanUseForDirectory is Windows Backup and Restore.)
EDIT:
Questions re: Mac OS X bundles (which are complex and weighed down by legacy options--just like Windows--despite Apple's marketing hyperbole):
What happens to file type associations when a bundle is deleted? Does the operating system unregister associations automatically?
Are orphaned preferences files automatically removed, or are they left in place to be picked up again if the bundle is ever reinstalled?