A couple more ways of skinning this one.
The first is very similar to the "InStr()" solution, but you won't need to worry about space characters in names, or short names that are present in longer name:
code:
$asIgnore="computer1","computer2","computer3",...
If AScan($asIgnore,@WKSTA)<0
; Do install
EndIf
My preferred way however would be to use an ini file. This is more flexible and can be used over and over again.
Here is a simple application delivery mechanism. Have a file which has a section containing a list of software updates to apply.
Each software update has a section where you enter the names of any PC you want to explicitly ignore when you initially create the section. As PCs are updated they will write a timestamp to the file.
The file would look something like this:
quote:
update.ini
[SOFTWARE-LIST]
IE60sp1=1
othersoft=1
...
[IE60sp1]
PC38028=Ignore
PC29381=Ignore
PC02349=2003-03-01 12:30
PC91234=2003-05-16 11:08
Your update script will look like this:
code:
For each entry in SOFTWARE-LIST
Is this PC in the software's section?
YES IT IS:
No update is required.
Else
NO IT ISN'T:
Write the time and date to the software section using the PC name as a key
Run the update script
EndIf
EndForEach
If you keep keep your update scripts in the same subdirectory and name them the same as the section you can automate this and not have to change your login script again.
As an added bonus you will get a record of which PCs have been updated, and when it happened.
The only drawback is that the ini file will get quite large over time, so you may need to remove sections when an update has been rolled out.