PPT2HTMLBatch stops processing when it encounters a password protected file
When PPT opens a password-protected file, it displays a dialog box asking for the password.
And then it waits forever for the user to either type a password or to dismiss the dialog box, which completely stops PPT2HTMLBatch and PowerPoint in their tracks.
There's no way to test the file before opening it, so PPT2HTML can't simply skip password protected files and move along.
Until now, this has been a problem if you want to run PPT2HTMLBatch unattended to process PPT files as they arrive. One password protected file could stop the whole processing run.
We're now distributing a small program called WindowWatch along with PPT2HTMLBatch.
If WindowWatch.EXE is in your PPTools folder, PPT2HTML launches it just before attempting to open each PPT file in a batch.
It tells WindowWatch to hang around for fifteen seconds, look every 1/4 second for PowerPoint's Password dialog box and, if it appears, dismiss it by sending it an ESC keystroke.
When a user or WindowWatch dismisses the Password dialog this way, it triggers an error that PPT2HTMLBatch can trap, report and move past, without interrupting its processing of files.
If the Password dialog box never appears, WindowWatch quits after fifteen seconds.
Modifying WindowWatch's behavior
To change the way WindowWatch works, open your PPTools.INI file and look for the [PPT2HTML] section.
Under that, look for the line:
WWCommandLine=Password!15!{ESC}
If it's not there, add it (copy and paste from this page is the simplest/most accurate way to do that)
What's it mean? This is the command line that PPT2HTMLBatch will send to WindowWatch when launching it.
WindowWatch divides the line at the ! (exclamation points) and turns it into three or more parameters, in order:
- The name of the dialog box/window to watch for (in this case, Password)
- How long to wait for it before quitting (15 seconds)
- What keystroke(s) to send to the dialog box when it appears ({ESC} = an ESC keystroke)
- Optional additional parameters, separated by ! characters. Each additional parameter is interpreted as another keystroke or keystroke sequence to send, with a 1/4 second pause between each sequence.
Why change anything?
Normally you won't need to, but
- If you're processing huge files that take longer than fifteen seconds to open, you might want to increase the "timeout" value.
- If a future version of PowerPoint changes the title of the Password window (the text that appears in the blue title bar at the top of the window or dialog box), you can tell WindowWatch the new name of the window it should look for.
- Likewise, if the keystrokes needed to dismiss the dialog box change, you can keep WindowWatch up to date.
To learn more about specific key sequences you can use here, start PowerPoint, start a new presentation if PowerPoint doesn't start one for you automatically, press Alt+F11 to launch the VBA editor, then use its Help feature to search for "Sendkeys".
What can't it do?
- WindowWatch is not a password-cracker, nor will it offer any help in breaking into protected files.
- If you have a series of files, all with the same known password, you could probably modify the PPTools.INI file to have WindowWatch send the password instead of dismissing the dialog box.
- It can't help with write-protected files. In theory, you could have WindowWatch send an Alt+R keystroke before sending an ESC. That would, in fact, allow PPT2HTMLBatch to open a modify-protected file. But since PPT2HTMLBatch needs to make temporary changes to PPT files it processes, it still can't process the file.
What if I don't want or need WindowWatch?
You can disable WindowWatch completely by moving WindowWatch.EXE out of the PPTools folder or by renaming it.
[Previous] [Home] [Next]