Registered member login:
Register Now
Altirigos » Homepage2

» Current Poll
Do you leave the Aclient enabled?
YES - 82.31%
107 Votes
NO - 17.69%
23 Votes
Total Votes: 130
You may not vote on this poll.
» Stats
Members: 9,499
Threads: 11,754
Posts: 55,313
Top Poster: Nick (4,981)
Welcome our newest member, anthony.hardy
» Online Users: 26
0 members and 26 guests
No Members online
Most users online at once 294, 06-30-2007 at 12:24 PM.
» March 2010
S M T W T F S
28 1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31 123
View Single Post
Old 03-11-2008, 04:40 PM   #13 (permalink)
Brandon
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,364


Could someone correct me here. I would like to use this but with an array to message a group of computers. I don't know much vbs though.

1. Can I modify the object in the loop each time for a new computer?
2. How can I dynamically initialize an array -- Dim computers(x) ?

Here is what I have:

Code:
OnErrorResume Next
' 0 = No Icon
' 1 = Information Icon
' 2 = Warning Icon
' 3 = Error Icon
' 4 = Altiris
MyIcon = 2
' Set you your default message title
MyTitle = "Message from IT"
MyMessage = "Please wait until the backup has completed."
Dim computers(1)
computers(0)="computer1"
computers(1)="computer2"
ForEach item In computers
Set NSAgent = CreateObject("Altiris.AeXClient", computers(item))
Set SessionManager = NSAgent.SessionManager
Set Sessions = SessionManager.Sessions
Set Session = Sessions.Item(0)
MyReturn = Session.DisplayBalloon(MyTitle, MyMessage, MyIcon, 30, Nothing)
WScript.Sleep(3000)
Session.HideBalloon(MyReturn)
Next
Thanks!
__________________
Brandon
Brandon is offline   Reply With Quote
 
Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 11:08 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
vB.Sponsors
Altirigos