Our software deployment folks like to use batch files to push software/scripts around the organization. Our network people don't like us pulling packages across the WAN links. I realize that multicast handles most of these issues but we are beginning to implement preferred servers as well. Has anyone figured out how to put a variable in a batch file so it will still download from the preferred server vs. the core?
Sounds like you are using a wrapper (script that calls an exe/msi setup). I can think of a couple of ways to accomplish this:
I'm not sure on what your exact software/scripts process is doing without knowing more......but maybe this will help. I don't think LANDesk have built in a variable that can be used on the fly during software distribution tasks/imaging yet to get the preferred server name.
Unfortunately the preferred server tools only work under WinPE. Anyone else have thoughts on this as have to do basically the same thing. Batch file that copies files from the local server and then writes a file up to the preferred server when its done. I haven't looked yet, but is the perferred server file in LD9 consistent enough to be read?
I re-appropriated a bunch of the code from the preferred server tools to enable some level of preferred server awareness in my own AutoIT scripts. It should be LDMS9.0 compatible. I'll see if I can dig something out.
Actually, rather than waiting around for me to dig out old code, have you tried the updated version of the tools from droppeDPackets? I belive that version supports running from within Windows.
I did an initial test of the updated prefmap and it actually caused sdclient.exe to consistantly crash. Plus, the help on it still says it only runs under WinPE. Anyone use it on other platforms?
Pretty sure I got something working. If you can wait until next week, I'll see what I can find out. What LANDesk service pack level are you at, out of curiosity?
I have a version of prefmap which is my edit of the original Jan Buelens code, that from experience works under both WinPE and Windows in 9.0. Happy to provide this to the community as long as someone from LANDesk authorises me to do so. They can contact me if that is that case and I'll post it.
Attached is Prefmapv3. As per the script credit goes to original author, I've merely modded it to add this functionality. I've tested the drive mapping feature successfully in both WinPE and Windows.
Couple of things to note:
Let me know if you find any issues.
All the best
For batch files we use %~dp0 as the clients themselves will go thier local cache, peers, then preferred server before they come back to the core. So %~dp0 will run the code from wherever it lies.
Instead of \\SERVERNAME\SoftwareVendor\Software\Setup.exe it would be %~dp0SoftwareVendor\Software\Setup.exe.