Monday, June 16, 2008

Launching Active Content, Revisited

Since the original post about launching active content, which appeared nearly a year ago, I've changed the way I do it. So it's time to share the improved approach.

The latest Flash-Fix script works great and has been updated only for readability, but the original Net-Share script had at least three problems:

  • the script fails if there is no network

  • the script fails if network sharing is disabled (eg- in secure enterprises)

  • the script tends to run very slowly if a virus scanner is enabled

I have since come up with a replacement called the IE-Fix script, and it directly updates the user's registry to allow active content to be launched from removable media and the current working directory. This works like a champ in most instances, and directly overrides the default settings of the IE browser, rather than trying to trick the browser into thinking that the content is running from a network device. It does not slow the presentation down in any way, and fails gracefully. So use IE-Fix instead of Net-Share workaround.

The IE-Fix script would fail if virus scanning software or admin rights prevented a user from updating their registry. But registry updates are now so common that this is not usually blocked. And the script only operates on the HKCU hive, where even guest and limited account users can make registry changes. In the readme.txt file on any CDs or DVDs that use this script, I also advise that the IE settings for launching active content can be modified manually (be sure to tick both My Computer and CD options).

I also launch the Flash-Fix and IE-Fix scripts from a script named autorun.bat located in the root directory of the removable media. This simplifies testing.

Hope this updated information is helpful.


Anonymous said...


First off, thank you for being so responsive! Your updated code is impressive.

I am now chasing down PDF issues with my project: the page-linking problem in non-server-based PDFs. I was going to use your hidden share path script but due to the cited potential problems (and some more I found with PDFs), I think we are going to convert them to Flash documents and control them in that way.

Thanks again for your generous sharing of knowledge.


Pherank said...

Hello Bill:

Greetings from Mill Valley, Marin. I receive an error when I try to run these files: "Error opening /f:flash_fix.bat /r:min".

Now the way I've got the files set up, ShellExecute.exe, autorun.bat, autorun.inf, flash_fix.bat, and ie_fix.bat are all sitting at the same level, at the root of the CD. How would I need to change the path to flash_fix.bat (assuming that is the issue)?

Bill Claxton said...

The correct location of flash_fix.bat is in a subdirectory named 'installers'. If you wish to change this location, modify the following line in autorun.bat.

if /i exist installers\flash_fix.bat start /wait /b installers\flash_fix.bat

I like to keep the root folder tidy. Apologies for any confusion caused.

I do miss Mill Valley. You are very lucky to live there! I visit Marin about twice a year now, and will hopefully make it to the film festival in October. Feel free to connect on Facebook.

Pherank said...

It would be a beautiful summer in Marin if it weren't for the hundreds of wild fires turning the air a sickly orange color. I think I'd rather be in Singapore.

It looks like there's more going on here than path problems. I've done some local testing and if I use the command line to run the autorun.bat file everything works great (although my Internet Security won't allow the registry changes to IE). The Flash trust file is created and works fine. Problem is, if I try to autorun these file from CD I get the same error message. I tried changing the autorun.inf to this:

label=Nurse Training
shell\viewreadme\command=notepad \readme.txt
shell\viewreadme=&Read Description
open=shellexecute /f:autorun.bat /r:min

(so that the autorun.bat would be invoked, but now I get this error:

Error opening /f:autorun.bat /r:min

So basically I can't autorun a .bat file from my CD-ROM drive. I don't suppose you have an idea what's going on here? My IE settings are set to allow active content on CD. Oh, and if I use Explore to look at the files on the CD and double-click autorun.bat, everything runs fine. There's obviously some issue with running the autorun.inf file. I'm stumped.


Pherank said...

Hello Bill:

I just wanted to let you know tha tI finally got everything working, but it required using a different version of the ShellExecute.exe. The file you are linking too doesn't work for me on Windows XP SP2. I found more downloads of the ShellExecute located here:

Bill Claxton said...

Pherank (Frank), drop me a note at ''. Noticed you're doing some kind of Nurse Training, and many of my customers are in healthcare. I should be in Marin in September, and it would be nice to connect.