I am trying to tell another section of the scritp to install a printer if the name is found on the this list. Would it be possible to do it this way. I tested it and it works some of the times.
LET>SYSTEM=ABETHONEY
LET>SYSTEM=JARRIGOPC
LET>SYSTEM=DEACCOMP
LET>SYSTEM=ABETHONEY
LET>SYSTEM=EPEREZ
IF>COMPUTER_NAME=SYSTEM NOTE: IF Computer maches do this
run program>C:\Windows\system32\calc.exe
ELSE
run program>C:\Windows\SYSTEM32\NOTEPAD.EXE
Installing printers by computer names
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Hi,
No, SYSTEM will only ever be set to EPEREZ
You could make an array, or just a delimited list would work in this case:
But perhaps you could explain what you are aiming to achieve and we can give you some ideas as to the best way to go about it. An array might be better, or you could use a text file list ....
No, SYSTEM will only ever be set to EPEREZ
You could make an array, or just a delimited list would work in this case:
Code: Select all
Let>SYSTEM_LIST=ABETHONEY;JARRIGOPC;DEACCOMP;ABETHONEY;EPEREZ
Position>COMPUTER_NAME,SYSTEM_LIST,1,InList
If>InList>0
Run>calc.exe
Else
Run>Notepad.exe
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?