Home > OS Deployment, Scripts > Preferred Server Tools

Preferred Server Tools

Jan Buelens is the creator and owner of this tool.

Jan Buelens wrote a utility called prefmap.exe in AutoIT so preferred servers could be used in WinPE.  I have modified the code so it now works in Windows XP and Windows 7 (32-bit and 64-bit).  The main reason people are looking for it to work in Windows is for Profile Migrations.

Enjoy!

Prefmap 3.0 with RunEnv.exe now

Categories: OS Deployment, Scripts Tags:
  1. emiranda
    June 10th, 2011 at 14:07 | #1

    Hello,

    I would like to make some suggestions to the new code that is being posted:

    1. I would change the RegRead(“HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\LDWM”, “CoreServer”) to RegRead(“HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\EventLog”, “ServerName”).

    The reason for this is because the RegRead you are using resolves the core name however if you use FQDN as your coreserver then it will return the value “coreserver.domain.com” and your preferredservers.dat only creates preferredservers.coreserver.dat. It will not put the FQDN in the file name, so that means core server + FQDN will fail on line If not GetPrefServerFile() Then ErrorExit(“preferredserver(s).dat not found”, 3). If you go to the RegRead that I suggested then it gives the coreserver name value only without the FQDN and will not matter if you have FQDN in your coreserver name or not.

    I also suggest including runenv.exe which Jan created as it is just as important to use with prefrep.exe if you are using it with the /var=pref variable.

  2. denny
    June 10th, 2011 at 14:57 | #2

    Thank you for the suggestion. I made the changes you suggested as I didn’t consider FQDN. I also added the RunEnu to the zip download again. Thanks for the help, Denny.

  3. etherk
    August 4th, 2011 at 21:31 | #3

    It looks like you made the change in the path for the registry key but did not update the String name from CoreServer to ServerName.

  4. v.taillet
    September 21st, 2011 at 10:00 | #4

    Hello, I tried to use prefmap.exe in WinPE environment, but I have the message : “preferredserve(s).dat not found”. What I have to do ? Thanks

  5. v.taillet
    September 21st, 2011 at 16:26 | #5

    I have removed the semicolon of this ligne :
    ;$CoreServer = RegRead(“HKEY_LOCAL_MACHINE\SOFTWARE\Intel\LANDesk\LDWM”, “CoreServer”)
    And I have added “/attemptpref”
    Now win_prov_files.xml and preferredservers.dat are correctly downloaded

    But preferredservers.dat seems to be empty :
    X:\ldclient>more preferredservers.dat
    1316658414?

    I have 8 preferred servers without IP range. Why it is empty ?
    Thanks

  6. v.taillet
    November 8th, 2011 at 10:41 | #6

    Hello,
    Finally it works perfectly on winPE with ip ranges.
    But now I try to use it on Windows XP and Windows 7 (x86/x64) because of profile migration, but it does not work :

    When I use prefmap.exe /shr=share /drv=Z /usr=domain\user /pwd=password, i have the message “preferredserver.dat not found”.

    So I type manually the command prefmap does (on a win xp x86) :

    “c:\program files\landesk\ldclient\sdclient.exe” /f /o /p=http://SERVER.DOMAIN/ldlogon/provisioning/win_prov_files.xml /requirepref

    But I can’t find preferredserver.dat in “c:\program files\landesk\ldclient\sdmcache”.
    I try also :

    “c:\program files\landesk\ldclient\sdclient.exe” /f /o /dest=d:\temp\win_prov_files.xml /p=http://SERVER.DOMAIN/ldlogon/provisioning/win_prov_files.xml /requirepref

    But in d:\temp, win_prov_files.xml is not downloaded.
    The computer is in a preferred server’s ip range.
    I tried with /requirepref and /attemptpref

    Does anyone use this tool on windows xp / 7 ? Thanks

  7. v.taillet
    November 8th, 2011 at 10:55 | #7

    @v.taillet
    (ok nevermind, it works : i type my command in a elevated cmd and preferredservers.dat appears.)

  1. No trackbacks yet.
You must be logged in to post a comment.