1 of 1 people found this helpful
I have requested that LANDesk expose the preferred server name so that it can be used programmatically, maybe this will happen in 9.0. So you have these options (plus more that others will offer):
- Use your VB script to grab the preferred server and use it as a variable in your script. Grab the name from C:\Program Files\LANDesk\LDClient\sdmcache\preferredservers.<CORE NAME>.dat
- In your vbscript programatically find a way to identify the server name the script is ran from. In Autoit it would be @ScriptDir vbscript will take a lot more lines ;-).
- Use a DNS alias or DFS so that you have a consistent/predictable unc path (e.g., \\packages\.....)
- Rather than run from source you can zip up the source so that you have one install file. sdclient has some issues (slowness) when a lot of smaller files are in a package. THis way distribute the one file, expand, then run locally. This will help with peer downloads, and targeted Multicast if needed.
Hopefully this gives you some ideas.
thanks for your fast reply, zman!
your first idea was exactly the one, which i thought about this morning. just added another sub to my vbs ... works pretty fine.
if there's another - somewhat "official" - way to do this ... please tell me ;-)
thanks for your help!
LOL - If it works it is official.
Would you be able to share the portion of your VBS code that extracts the Preferred server info?
For similar reasons I am also trying to use Batch package and Run from source method to install Office 2007 (with many MUI) and other similar software. I have not spent any time writing a VBS or an AutoIt script to extract the Preferred Server value, but trying to use batch run-time variables "%~d0" & "%~dp0".
%currdir%PackageShare\PackageDir\Setup.exe /adminfile %currdir%PackageShare\PackageDir\Updates\Office2007Std.MSP /config %currdir%PackageShare\PackageDir\Standard.WW\config.xml
Although the batch works outside of LDMS, it is not working with Run from source method.
Have anybody tried this successfully?
no problem. My vbs ist called "pps_setup.vbs" and it is called from the batch this way:
cscript \\%coreserver%\packageshare\packagedir\install\pps_setup.vbs \\LDPPS\packageshare\packagedir\install\setup.exe
The LDPPS-String is replaced by pps_setup.vbs. Here are the main parts of the script (it does a lot of other stuff - like error checking, generating some flagfiles, etc etc)
pps_file = programfiles & "\LANDesk\LDClient\sdmcache\preferredservers." & coreserver & ".dat"
wscript.echo "opening " & pps_file
Set pps = fso.opentextfile(pps_file, ForReading)
pps_line = pps.readline
pps_line_arr = split(pps_line, "?")
ppserver = pps_line_arr(1)
wscript.echo "preferred package server: " & ppserver
after extracting the package server, the commandline will be executed:
arg_string = trim(arg_string)
arg_string = replace(arg_string, "#", chr(34))
arg_string = replace(arg_string, "LDPPS", ppserver)
wscript.echo "now executing: " & arg_string
return = wshShell.run(arg_string, 1, true)
wscript.echo "finished with errorlevel: " & return
Thank you so much for sharing the VBS code. This may be helpful. Also, you may want to look into Jan Buelen's Preferred Server Tools, as Zman pointed out and posted in http://community.landesk.com/support/thread/6479. I reviewd the solution and it looks promising.
Thank you, Zman!