Registered member login:
Register Now
Altirigos » Homepage2

» Current Poll
Do you leave the Aclient enabled?
YES - 82.81%
106 Votes
NO - 17.19%
22 Votes
Total Votes: 128
You may not vote on this poll.
» Stats
Members: 9,488
Threads: 11,748
Posts: 55,279
Top Poster: Nick (4,981)
Welcome our newest member, johno
» Online Users: 42
3 members and 39 guests
Gaute, lomac, Onion
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, 06:08 PM   #14 (permalink)
jdean
 
jdean's Avatar
 
Status: Super Altiris Admin
Join Date: 02-24-2005
Location: Orange County, California, USA
Posts: 585


How are you piping the computer names to the vbscript?

Typically, you would use REDIM ARRAY(N)

And do a For/Each and increment N by 1

Quote:
Originally Posted by Brandon View Post
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!
__________________
IT Factotum * Altiris Addict * Wise Monger * VBScript Zealot

Jereme Dean
Orange County, CA
jdean33442@gmail.com
jdean is offline   Reply With Quote
 
Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 02:53 AM.


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