Symantec Connect
  • Login
  • Register
  • Endpoint Management & Virtualization
    • All of Connect
    • Backup and Archiving
    • Clustering and Replication
    • Endpoint Management & Virtualization
    • Storage Management
    • Security
    • Inside Symantec
    • Vision User Conference
    • Partners
    • Developers
    •  
  • Overview
  • Forums
  • Articles
  • Blogs
  • Downloads
  • Events
  • Videos
  • Groups
  • Ideas
Login to participate
Endpoint Management & Virtualization Community BlogRSS

How to Launch an Application or Run a Script when a Layer's State Changes

Jeremy_Hurren's picture
Jeremy_Hurren
January 17th, 2006
Filed under: Workspace Virtualization, Performance, Windows, Endpoint Management & Virtualization Community Blog, Endpoint Management and Virtualization

SVS CodeMaster Jeremy Hurren just threw another gem over the wall. If you want an SVS action (activate, deactivate, delete ...) to trigger an application, or send a message, or play a sound, here's the recipe.

Have you ever needed to run an external process when a layer gets activated, or deactivated, or deleted? You might, for example, have a third-party inventory system and want to re-evaluate the computer's inventory when layers activate and deactivate. (Send us your examples*).

Or maybe, like me, you just want to play a sound when layers activate. The following example plays the ding.wav file when a layer is activated and the chord.wav file when a layer is deactivated.

HKEY_LOCAL_MACHINE\SYSTEM\Altiris\FSL
OnPostActivate (MULTI_SZ) = "PlaySound.exe "C:\Windows\Media\ding.wav""
OnPostDeactivate (MULTI_SZ) = "PlaySound.exe "C:\Windows\Media\chord.wav""

In addition to a global setting like the one above, you can also change settings for individual layers by using the following registry key.

HKEY_LOCAL_MACHINE\SYSTEM\Altiris\FSL\1 (replace 1 with the layer number)

There are a number of events that can be captured in this fashion. Here is a complete list of the possible registry values, all of which are REG_MULTI_SZ types:

  • OnPreActivate
  • OnPostActivate
  • OnPreDeactivate
  • OnPostDeactivate
  • OnPreImport
  • OnPostImport
  • OnPreExport
  • OnPostExport
  • OnPreReset
  • OnPostReset
  • OnPreDelete
  • OnPostDelete
  • OnPreCreate
  • OnPostCreate
  • OnPreCapture
  • OnPostCapture

* Let us know if you've come up with some cool applications for this tip. Send us your ideas and we'll post them here.

+2 (2 votes)
  • Jeremy_Hurren's blog
  • Login or register to post comments
  • Comments RSS Feed
hamletv's picture
hamletv
3 years 40 weeks ago

Activate/Deactivate related layer

Can it be made so that an application layer, when activated/deactivated, activates/deactivates a related data layer?

-Hamlet

0 votes
  • Login or register to post comments
Jeremy_Hurren's picture
Jeremy_Hurren
3 years 39 weeks ago

Activate/Deactivate related layer

Sure it can. You could just create an OnPostActivate and OnPostDeactivate for the application layer. For each, you would enter a command like "svscmd.exe [GUID-of-data-layer] activate" or "svscmd.exe [GUID-of-data-layer] deactivate".

Great Idea!

--LordJeb

0 votes
  • Login or register to post comments
Thunder-man's picture
Thunder-man
3 years 13 weeks ago

Group Layer (OnPostActivate / OnPostDeactivate)

Hi,
I post a Tip for OnPostActivate / OnPostDeactivate to hide a file, when a Layer is activate / deactivate.

See this ...
Altiris support forum

Sorry for my bad English…

Google English…
SVSLoad.com

+1 (1 vote)
  • Login or register to post comments
toralf's picture
toralf
3 years 3 weeks ago

Hi lordjeb,

Hi lordjeb,

Thank you for adding this feature. It opens a lot of possibilities.

But I wonder how I could use OnPreCreate or OnPostCreate. A layer only exists after it is created. And I can't add anything to the registry when it doesn't exist yet.

Or are these events only useful as global events? I understood from your main post that the list of events only applies to layers. And that only the de-/activate events can also be used globally. But I guess I misinterpreted it. Could you please confirm? Thanks a lot.

Ciao
toralf

Ciao
toralf

+1 (1 vote)
  • Login or register to post comments
sizemore's picture
sizemore
2 years 27 weeks ago

Services?

Could this be used to start a service? OR add a service and start it?

Altiris Newb

0 votes
  • Login or register to post comments
Swami's picture
Swami
2 years 2 weeks ago

GUI Please

Is it possible to add / have a GUI Please?
You now for old guys like me, remembering the commands are bit tuff. I used to write it in a piece of paper & loose them frequently :(

0 votes
  • Login or register to post comments
Scott Jones's picture
Scott Jones
2 years 2 weeks ago

GUI = Wise Package Studio

The GUI for creating and editing SVS events is in Wise Package Studio. There is also a free tool here on the Juice.

Scott Jones
Product Manager
Altiris, Inc.
Now Part of Symantec

0 votes
  • Login or register to post comments
Swami's picture
Swami
2 years 1 week ago

Thank You

Thank You very much for the informations.
Regards,
Swami

-1 (1 vote)
  • Login or register to post comments
rpfenninger's picture
rpfenninger
1 year 13 weeks ago

Restart spooler

We use the OnEvent actions (OnPostActivate, OnPostDeactivate and OnPostReset) most of the time to restart the spooler service so that printers from virtual packages work correctly.

+1 (1 vote)
  • Login or register to post comments
Pascal.KOTTE's picture
Pascal.KOTTE
47 weeks 6 days ago

The new link to the GUI tool is there !

https://www-secure.symantec.com/connect/downloads/...

Why not running a robot to correct this kind of failed link after migrating the Juice ? :-(

~~PaKo @ www.BeMore.ch (Sorry for the Bad English, did you speak French ? Join us https://www-secure.symantec.com/connect/groups/gro... )

0 votes
  • Login or register to post comments

Would you like to reply?

Login or Register to post your comment.

About Endpoint Management and Virtualization Community Blog

The Endpoint Management & Virtualization Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management & Virtualization community. Any authenticated Connect member can contribute to this blog.
Filter by:

Recent Blog Posts

  • Windows Silent Software Installation tool
    riva11 - February 08, 2010
  • Workflow 6.5 Out of Memory Problems
    BRING - February 04, 2010
  • Check out the virtual launch of 2010 Intel vPro Technology platform
    Terry Cutler - February 04, 2010
  • Bootvis, Identify Boot Problems and Solve Them for Faster Boots
    erikw - February 04, 2010
  • How To: Install one or more files to the root of the C:\ Drive
    rjemison - February 03, 2010

Blog Tags

Altiris Client Management Suite Altiris Deployment Solution Altiris IT Asset Management Altiris Notification Server Altiris Server Management Suite Basics Best Practice Beta Compatibility Configuring Database Dell Management Products Endpoint Management and Virtualization Endpoint Protection (AntiVirus) Features Ghost Solution Suite HP Management Products Helpdesk Solution Installing Licensing Linux Mac OS News Performance Reporting Tip/How to Upgrade VMware Virtualization Windows Wise Application Packaging Workflow Solution Workspace Virtualization pcAnywhere
© 2010
  • Symantec Corporation
  • Contact Us
  • Get RSS
  • Newsletter
  • Privacy Policy
  • Symantec.com