Newer Actionscript commands

It came up in the recent user group meeting that some recent ActionScript additions (well recent to the 8.2 release) were not well known and that there are very few places where they are mentioned. So to make things easier to find, here are the links to the most recent documentation and a brief explanation of the function. Note: You need to have an 8.2 console or greater to use these or the console will not recognize these as valid ActionScript commands.

override
One powerful command is the override command that alters a wait or run command that follows. This allows built in “run as current user” functionality and the ability to wait for a full process tree so that you can avoid an executable that spawns another process then quits. The upgrade fixlets use this so you can see examples of these.
http://www-01.ibm.com/support/knowledgecenter/SS63NW_9.2.0/com.ibm.tivoli.tem.doc_9.2/Platform/Action/c_override.html

extract
Extract was added to have a destination directory (so you don’t just expand into __Download)
http://www-01.ibm.com/support/knowledgecenter/SS63NW_9.2.0/com.ibm.tivoli.tem.doc_9.2/Platform/Action/c_extract.html

action log
Logging control was added. Note that if you use Secure Parameters the default for that action is action log command
http://www-01.ibm.com/support/knowledgecenter/SS63NW_9.2.0/com.ibm.tivoli.tem.doc_9.2/Platform/Action/c_action_log.html

7 Likes

Thanks for sharing the info.

I usually use waithidden in nearly all cases, but I have been wondering what the differences are with waithidden and waitdetached ? And also with this override option, it seems you can have it do both hidden & detached at the same time, but I’m not clear on the effects or differences.

“detatched” means we set DETACHED_PROCESS on the thread we create to run the job.

Use http://msdn.microsoft.com/en-us/library/windows/desktop/ms684863(v=vs.85).aspx for reference here.

“hidden” means we set STARTF_USESHOWWINDOW in dwFlags and SW_HIDE in wShowWindow in the STARTUPINFO structure

Use http://msdn.microsoft.com/en-us/library/windows/desktop/ms686331(v=vs.85).aspx for reference here.

Both of these are Windows only overrides and the waithidden and override behave the same.

1 Like

Would there be any advantage of using both hidden and detached through the override?

It all depends on what you need. The detached simply means the Client’s environment is not copied over to the thread space that the process will be run in. So you might want that in combination with hidden.

1 Like

Some feedback on the documentation page:

The examples for the extract command on the above linked page use “.zip” files, which last I checked did not actually work with the extract command.

extract InstallMyApp.zip

This is subtle, but I also think it would be better if the example used “C:\Windows\Temp” instead of “d:\temp”. I would recommend using either the normal __Download folder or “C:\Windows\Temp” and not some other folder unless there is a very good reason.

extract InstallMyApp.zip "d:/temp"

What formats do work with the extract command?

So far as I know, the only format I’ve been able to extract is archives created with the BFArchive.exe command.

And whatever that format is, not even 7-Zip will touch. I generally ignore both BFArchive and Extract, in favor of portability. I recommend using 7-zip to create .zip files (and download a copy of 7za.exe to extract them), or better yet use 7-zip to create self-extracting archives.

For Linux applications, gzip’ed tar archives are a good balance between size and portability.

As far as I know, and as @JasonWalker mentioned, the extract command only works with archives in the BFArchive format, usually created with BFArchive.exe or through some of the wizards in the console.

This is correct. It only works with a BFArchive file. Some people do rename them ZIP’s for some reason I have noticed.

As to the docs, the __Download folder would be the default extraction location, the idea for the extract target is to put it somewhere the app needs it hence the more custom destination. I agree though the docs might be a bit confusing.

1 Like