I’ve long been annoyed by the mismatch between Windows’ file-orientation and Scrivener’s directory orientation… but only recently found a way to fix this. There are two tricks you can use to make Scrivener projects look more-or-less like ordinary Windows files, and open with a double-click just like regular files.
The first trick is just a wee bit of registry magic, that lets you double-click .scriv directories to open them in scrivener automatically (without having to dig down to find the project.scrivx):
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Folder\shell\scriven]
@=“Open with Scrivener”
“DefaultAppliesTo”=“System.ItemName:~>”.scriv""
“AppliesTo”=“System.ItemName:~>”.scriv""
[HKEY_CLASSES_ROOT\Folder\shell\scriven\command]
@="“C:\Program Files (x86)\Scrivener\Scrivener.exe” “%1\project.scrivx”"
(Be sure to replace the path to Scrivener.exe as appropriate!)
This bit of magic basically says to windows, "if a folder name ends with ‘.scriv’, then add “Open with Scrivener” to the right-click menu, and make it the default option as well (which makes it double-clickable). This only works on Windows 7 (and presumably 8), but is quite worthwhile to add. (And hopefully, the L&L team will add it to future Scrivener installation packages!)
The second trick lets you replace .scriv folders’ icons with a Scrivener icon. Just create a desktop.ini inside a project, with these contents:
[.ShellClassInfo]
ConfirmFileOp = 0
IconFile=C:\Program Files (x86)\Scrivener\Scrivener.exe
InfoTip = Scrivener Project
IconIndex = 0
Again, replace your Scrivener.exe path as appropriate. Then, using “attrib +s folder.scriv”, flag the project folder as a system folder. Voila… the project will now have a Scrivener icon in place of a folder icon.
Unfortunately, you have to apply this trick to each project directory individually; it’s not a one-time fix like the registry entry is. So, this would be much more useful if added to Scrivener itself: just have saving a project add a desktop.ini to the folder and flag it as a system folder. (Better still, by adding a scrivener.ico file to the project directory, and using IconFile=scrivener.ico instead of a path to the executable, the directory will always appear as a scrivener project with appropriate icon, even when copied to other computers, viewed over a network, etc.)
If you want to know how I found out these crazy tricks, see:
“How to Customize Folders With Desktop.ini” - msdn.microsoft.com/en-us/library … 85%29.aspx
“Creating Shortcut Menu Handlers” - msdn.microsoft.com/en-us/library … 85%29.aspx (Scroll down to the section on “Getting Dynamic Behavior for Static Verbs by Using Advanced Query Syntax”), and
“Using Advanced Query Syntax Programmatically” - msdn.microsoft.com/en-us/library … 85%29.aspx
So, as you can see, these tricks are all Microsoft-documented and approved ways to work this sort of magic. (In fact, both tricks degrade gracefully on older Windows versions; the desktop.ini trick works on Vista, and both Vista and XP just add a “Open with Scrivener” right-click menu to all folders. Not great, but you can always skip the registry entries altogether on older Windows installations, or go the IContextMenu route for those versions.)