09 August 2008
By Factor Mystic
In default-programs-editor, release
Version 1.3- August 9, 2008
- Fixed a minor UI bug where not all references were updated when the “Rename ProgID to File Type” preference was changed.
- About/Help link now points to this program’s own landing page instead of it’s blog category.
- The information url comment in exported .reg files has been updated to this program’s own page instead of it’s blog category.
- The program now checks for updates automatically when it is launched. This can be disabled in Advanced Configuration.
- A couple of additional minor UI adjustments (including a misspelled word in the error dialog- whoops!).
- Added a dialog to enable the deletion of both an extensions and ProgID’s.
- Fixed an rare bug that caused an immediate crash (both XP and Vista) based on information from online crash reports.
- Fixed a bug where extensions without ProgID’s would have a blank Friendly Type Name instead of EXT File, which is what Windows Explorer shows.
- Program identification comment at the top of generated .reg files now includes the version number.
- Moved the “Include extensions without a ProgID” checkbox to the extensions filter options list.
Several interesting changes in this release. Also, I’ve enabled comments on the blog.
Download
Continue reading
27 July 2008
By Factor Mystic
In default-programs-editor, documentation, release
Version 1.2
- Fixed a critical bug that caused an immediate crash on Vista x64.
- Added automatic online error reporting (can be disabled in Advanced Configuration).
- Added a friendly error dialog when the program crashes, replacing the generic .Net one.
- A couple of minor UI adjustments.

Default Programs Editor- Error Dialog
What information does the crash report have?
OS version, last executed method from a logging functions, and a stack trace. No personal identifying information. Each crash dump is saved to C:\Users\<user>\AppData\Local\factormystic.net\Default Programs Editor\<version>\ , which is also where the advanced.config file is saved.
64 bit
The x64 bug was quite odd. I was initially debugging on a vanialla rtm install, and the program worked fine. It wasn’t until I installed hotfix KB932471, an update for .Net 3.0, that it successfully crashed. I’m not sure exactly what changed in the framework to make it start crashing, but the bug was a relatively simple fix.
Download.
Continue reading
23 July 2008
By Factor Mystic
In htaccess, php, ruby, web stuff
I’m sure this is a horror in dozens of ways, but eruby sucks and my host doesn’t have mod_ruby. So I got creative.
The .htaccess rewrites requests for any file ending in .rb to this handler.php, which confirms that the requested ruby script exists, then executes it and prints the result.
<?php
//PHP script to execute ruby scripts when the host doesn’t have a cgi handler for .rb
//Use with this .htaccess:
/*
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.rb$ handler.php?rb=$1.rb [NC,QSA]
*/
$file = $_GET['rb'];
if(in_array($file, scandir(‘.’)))
{
foreach($_REQUEST as $key=>$value) if($key != ‘rb’) $args .= “ $key=”.urlencode($value);
echo exec(escapeshellcmd(‘./’.$file.$args));
}
else
{
echo ‘404- Page not found’;
}
?>
Here’s an example ruby script using this hack- nothing special to do here at all:
#!/usr/local/bin/ruby
require ‘cgi’
print “Hello from Ruby!<br>”
print “All of the input variables:<hr>”
ARGV.each do |arg|
print CGI::unescape(arg.to_s)
print “<br>”
end
All the GET, POST, and COOKIE variables are at your fingertips in ARGV! (You could get them with Ruby’s CGI module as well.)
So here’s what it looks like to users:

Screenshot of ruby without mod_ruby hack
Continue reading
15 July 2008
By Factor Mystic
In default-programs-editor, release
Version 1.1
- Now distributing as the exe and this changes file in a zip instead of just the exe.
- Put Context Menu and File Type properties group boxes into separate tabs.
- Replaced File Type column in the main extension list with Friendly Type Name.
- Autogenerated key names are now converted to lower case to fit with convention.
- A couple of additional minor UI adjustments.
- Url in the exported .reg comment was wrong.
- “Show shell extensions” checkbox moved to the Advanced Config tab (which means its state is persistent across sessions now).
- Searching for an extension in both the main extension list, and the File Type dialog now also transparently searches file type key names.
- Fixed the bug on XP where showing shell extension verbs caused it to crash
- New File Types are now created in the Select File Type dialog.
- The Add Extension dialog has been reworked to be more intuitive.
Here’s the biggest change to the UI- tabs replaced panes for Context Menu and File Type groups:

Download
Continue reading
11 July 2008
By Factor Mystic
In default-programs-editor, documentation
This is a walkthrough on how to change the “edit” context command for batch files from notepad to some other text editor
Start the program and make sure you’re on the “File Association” tab. On the left where it says “Search by Extension”, start typing “bat”. It searches as you type, so the .bat entry will come up right away. Select the pertinant entry on the list, and the middle and right panels will update with the file type details.

For this example, the right pane is what we need, because it has the list of context menu commands (”verbs” in Windows file association jargon). The one is the default double-click verb for this file type, but we’re changing the “Edit” entry, so click that. Note that the current action is to run notepad.exe, and pass the file you’ve clicked as the parameter (that’s what the “%1″ is). Click the “Edit…” button.

Here you can edit the verb text and command. In the example here, I clicked “Browse…”, which opens a standard Windows Open dialog, and searched for EditPlus. This should be fine if you have that particular editor installed, otherwise, choose your preferred text editor. The path to your editor will be put into the command text box. You’ll need to add “%1″ to the end, so that your editor knows what file you’ve chosen to edit. Then click “Save”.

Note that there is now a tree node for Edit. The child nodes for any verb are also Edit commands, but the highest precedence setting is the one that Windows uses in the context menu. Since our modification is the top node for Edit, it’s the one that Windows will use when you right click a .bat file. Done!
Continue reading
11 July 2008
By Factor Mystic
In default-programs-editor, documentation
This is all the options I have to autoplay DVD’s-

MPC can play DVDs, so let’s make Windows use MPC to play a DVD when one is put into the computer. To start, open Default Programs Editor and switch to the “Autoplay Handlers” tab. Now, select the media type you want to change settings for, which in this case, is “DVD movie”.

The drop down list in the middle pane is just like the drop down list in the Windows autoplay settings. The checked list below it allows you to add or remove autoplay choices for this media type. However, Windows doesn’t know that MPC can play DVDs, so we’ll need to get it onto the list. Then, we can check it to make it an option for DVDs.
Click the “Add…” button.

Autoplay descriptions show up in the list as “Action Text” using “Provider Text”. For example, in “Play DVD movie using Windows Media Player”, “Play DVD movie” is the action and “Windows Media Player” is the provider. So for this, put some variant of “Play DVD” and “Media Player Classic”. You can also choose an icon for this entry. Windows comes with a ton of icons which work well for things like this; I selected one that says “DVD” on it. Finally, put in the full path to Media Player Classic. You can do this with the “Browse…” button. Before you save, make sure to add “%1″ to the end of the command string. Just like in the other examples, this is so Media Player Classic knows what to do when Windows starts it.
Note that “Save” has a shield icon on it. This indicates that a UAC prompt will pop up when you click it. Go ahead and do so, and confirm the security warning. The program is now in Administrator mode, with our new autoplay handler highlighted. Check it do add this as a possible autoplay handler for DVDs. Now, it will show up on the drop down list of options. Selec it and hit “Save” to confirm.

Media Player Classic is now added to the DVD autoplay choices, and is the currently selected action. Done!
Continue reading
11 July 2008
By Factor Mystic
In default-programs-editor, release, windows tweaks
This is an advanced Windows file association utility

Here is some sweet stuff you can do with it:
- Manually add extension information
- Change a file type’s description
- Change a file type’s icon
- Change an extension’s associated file type
- Add/Edit/Delete an extension’s default association
- Add/Edit/Delete other entries on the file’s context menu
- Preserve verb precedence hierarchy
- View shell extension entries on the context menu
- Remove ‘Default Programs’ association that Windows likes to make annoying to change
- Add/Edit/Delete your own autoplay handlers
- Change which autoplay options are available for users
- Disable that “Search web for unknown extension” dialog
- Single .exe utility, no installation
On top of all that, here are some bonus features:
- Make changes direct to the registry, or export them as .reg files for easy distribution
- Designed for Vista, with UAC support, so you can painlessly run as a standard user
- Works with XP too (a few features disabled, just use TweakUI)
- Make changes to your user account, or the machine default, or both
Documentation is admittedly sparse right now, but here are some how-to’s:
Feel free to email me with any suggestions or questions.
Download
Continue reading
13 April 2008
By Factor Mystic
In mark for deletion, release
This is a command line utility that marks a file or directory for deletion on the next reboot. It’s useful to remove files that are in use, such as file identified by antispyware, etc (though most of the time those programs can handle this themselves). Note that this requires elevated privileges, because the API it calls (MoveFileEx) writes to HKEY_LOCAL_MACHINE. Also, this will bypass the Recycle Bin when deleting the file. One last caveat: if you specify a directory, it must be empty. Requires .Net 2.0
Usage: >mfdelc.exe “some annoying file.dll”
Download
Continue reading
10 March 2008
By Factor Mystic
In release, turn off monitor
Changes:
- Modifier key (shift/ctrl/alt/win) no longer necessary for the hotkey
- You must click “Save” to make the hotkey stick, it’s not automatic like before
- ‘About’ link now takes you to the category for this utility, not a specific page, like I originally intended
Known issues:
- Config files saved a bit differently now, and it’s incompatible with the old way, so you might get an error when you first run. Solution: Just save a hotkey, which will overwrite the old config file with the new one.
- If you press a modifier then the key you want for the hotkey, sometimes it doesn’t work. Solution: Press and release the modifier key you want, then press the other key separately. Then it works.
Like before, hit a key or jiggle the mouse to turn the monitor back on (you can adjust that in the system power settings), and requires .Net 2.0.

Download
Continue reading
03 March 2008
By Factor Mystic
In release, turn off monitor
Changes:
- Customizable hotkey (click to capture hotkey, escape to stop)
- Tooltip on tray icon now shows what the hotkey is
- Custom hotkey is saved in a per-user config file (%appdata%\turnoffmonitor\turnoffmonitor\1.0.0.0\config.txt)
- Clicking the tray icon no longer turns off the monitor, it just brings up the window
- Interface changes- more compact, less distracting. Clicking the link takes you to the latest post for this program.
- Fixed a really annoying bug where the system would immediately turn the monitor back on
Like before, hit a key or jiggle the mouse to turn the monitor back on (you can adjust that in the system power settings), and requires .Net 2.0.

Download
Continue reading