Where I work we are having a lot of problems with Netbios name resolution. I personally believe that there are issues with the switches (we didnt have these problems before they went in), but since we outsource the hubs/routers/switches, I cant fix it and the people managing it havent done anything. But I digress.
My problems seem to be, for the most part, with WinNT OSs (NT/2k). I tried using the Kixtart "copy" command to copy the file from the netlogon directory to @LanRoot\drivers\etc\, but it didnt work and exited with an error code 2 (?). I couldnt find any information on what copy meant by error 2, so I tried to work around it.
so now, Im trying to use the shell and rename lmhosts.10 to lmhosts. I must be a complete doofus, because I cannot get it to work no matter what I do. Here is what I am trying to use (the variables come from elsewhere. I wrote it so I could have one script for multiple sites).
code:
$LMHostsPath = "@LanRoot\drivers\etc\"
$LMH = "$LMHostsPath" + "lmhosts."
$num = 10
$string = "%comspec% /c ren $LMH$num $LMH"
shell $string
This gives an error of "The syntaxt of the command is incorrect." So what exactly am I doing wrong?
also, is there a better way of doing this? I've seen people people discuss this problem, but no real resolutions.
Lastly, has anyone used Scriptlogic? I saw an ad and was checking it out, but wanted to know if its as flexible as kixtart.
_________________________
Be kind; each person is fighting his own private war.