Thanks you for reply... Always on the lookout ;-))
I'm using LDMS v9SP2...
I have read some article that explain, like Jan, if you run the sdclient, it will automatically generate the preferredserver.dat...
The problem is on the WinPE 9 SP2 it doesn't work. Even if I run manually the sdclient command, the preferredserver.dat file is never created, and of course I have a preferred server that works on a normal client ;-)
If I use the tools from Jan, prefmap, I receive a error message saying that the preferredserver.dat file doesn't exists...
Any idea ;-)
PS: I will also ask into the Jan's discussion that you send me.
Hey Lionel. We recently rebuilt our LANDesk core and applied all the latest patches and fixes. Since doing that, we're having the same issue. Through a little troubleshooting, I found that adding "/attemptpref" to the end of the command Jan uses in her exe to download a dummy file will cause the creation of the preferredservers.dat file. You'll need to install AutoIt, edit the file with that command, then recompile it and update your copy. If you have questions, let me know.
This was how I achieved it.
Create a dummy file named whatever you would like, I named mine "LocalPreferredServer.dat" on the server located here SERVER\Images\Tools
Create a batch script file (.bat or .cmd) with these contents.
Batch File Contents:
FOR /F "delims=?; tokens=2" %%i IN (%SystemDrive%\ldclient\preferredservers.dat) DO SET LocalPreferredServer=%%i
ECHO %LocalPreferredServer% > x:\preferredserver.txt
LANDesk Provisioning Template:
Action Type: Execute
Target Path: %%SYSTEMDRIVE%%\ldclient\sdclient.exe
Command-Line Parameters: /p="\\%corename%\Images\Tools\LocalPreferredServer.dat" /dest="%%SYSTEMDRIVE%%\LocalPreferredServer.dat" /requirepref /showprogress /preservedir
Working Directory: %%SYSTEMDRIVE%%\ldclient
Action Type: Copy
Source Path: \\%corename%\Images\Tools\GetPreferredServer.cmd
Destination Path: %%SYSTEMDRIVE%%\
Action Type: Execute
Target Path: %%SYSTEMDRIVE%%\GetPreferredServer.cmd
The batch script will create a text file with the preferred server under X:\preferredserver.txt
Or alternatively, you could use SetX to set it as an environmental variable and use it that way (I have not tested this method as I just mapped a network drive to it).