I have many sites and would like to run different scripts based on a “Location” property that im using
“Location”
SITE1
SITE2
SITE3
SITE4
SITE5
Location scripts
SITE1.script.vbs
SITE2.script.vbs
SITE3.script.vbs
I would automatically like to run the proper script based on the “Location” property which is set to SITE1 or SITE2… per server, also I would like it not to run a script (or error) if the location script name is not available
exists value of setting “Location By Subnet” of client
And use an action something like:
waithidden wscript.exe {value of setting “Location By Subnet” of client}.script.vbs
However, if you tell me what version your clients are at and how you intend to distribute the scripts, I may give you a different answer. Also, does the location ever change and thus you need to re-run a new script?
add prefetch item name=SilentInstall.cmd sha1={preceding text of first “;” of following text of first “sha1=” of line whose (it starts with (value of setting “Location” of client) as string) of download file “manifest.txt”} size={following text of first “size=” of line whose (it starts with (value of setting “Location” of client) as string) of download file “manifest.txt”} url=http://127.0.0.1:52311/slientinstalls/{value of setting “Location” of client}-SilentInstall.cmd
end prefetch block
waithidden “{download path “SilentInstall.cmd”}”
That’s it. But, your client has to be version 7.2… good incentive to upgrade?
Also, just to note… you don’t need to manually parse the setting value. Just use ‘value of setting “Location” of client’.