Run post-session script help

(imported topic written by HankDorsett)

I’m trying to setup a script that will notify users that someone was logged into their system. The script I’m trying to use is ‘msg * “text to user”’. MSG.exe * send a popup to all logged in users as well as an entry in the system event log. This script works running it locally, running from a remote connection, runnin from another script and scheduling it to run. The popup does not work when you use it for a post session script, it only adds the message in the system event log. Does anyone know why this isn’t working or a better way to do it?

Thanks,

Hank

(imported comment written by SystemAdmin)

Hi Hank,

Is this a post-session script after a Tivoli Remote Control session? If so, it might be useful to set DebugTrace=yes in the Target’s configuration in the registry (HKLM/Software/IBM/Tivoli/Remote Control/Target) and restart the service and try again to see what information is written about it.

Also, there are some requirements for the pre and post-session scripts, although if you are seeing an entry that the script ran in the System Event Log, these should be fine, but just in case: (From the documentation at:

http://publib.boulder.ibm.com/infocenter/tivihelp/v3r1/index.jsp?topic=%2Fcom.ibm.itrc.doc_5.1.2%2Ftrc-admin44.htm&path=76_4_5_4

):

When developing scripts, you must respect the following rules:   Define the scripts as batch files in Windows ( with extension .cmd ) and as shell files on Linux ( with extension .sh). On Windows the scripts should be named pre_script.cmd and post_script.cmd respectively and pre_script.sh and post_script.sh in Linux. Copy the scripts into a directory called scripts that you will find in the installation directory of TRC 5.1.2 in the target. Make sure they are executable just by root to avoid security exposures in Linux. Note: This directory MUST be owned by root and have the permissions 700 to allow root to read, write or execute and everyone 

else having no permissions, otherwise the script will not run and it
's execution will be taken as failed The pre-script and post-scripts are run with system privileges and without validation, to protect them from unauthorized access. Note: The installer will create the script directory with access just 

for administrators and localsystem in Windows and 

for read/write/execute just 

for root in Linux. Ensure that the scripts end within three minutes. If they run 

for longer they cannot 

return a valid execution code and the administrator at the controller is notified that the timeout elapsed and an error occurred. The execution code indicates whether the script has run. Define a non negative (greater than or equal to 0) exit code 

for the script to indicate that the script ran with success and a negative exit code to indicate that it ran with errors. Whenever an error occurs (negative exit code) a message reporting the exit code is shown at the controller side and the session will fail to start.