First thing you want to do when troubleshooting IWP scripts is open the script and choose "Web Publishing" under Show Compatibility. If any script steps are dimmed, you'll have to decide how to deal with it.
In this script, it's the Freeze Window step that is not compatible.
The quick fix:
At the top of the script add an Allow User Abort script step, set to Off.
This will cause IWP to simply ignore any step it can't perform. In this particular script that's no problem, but there may be scripts where that may cause Unexpected Behavior to put it mildly. In those cases you'll need to employ other methods, e.g. you can test for "web" in the application version and branch accordingly.