free log
CRM

Bozteck VNCScan Community

Community makes things happen
Welcome to Bozteck VNCScan Community Sign in | Join | Help
in
Home Forums

Need help launching script or Bat file to change DNS configuration

Last post 06-08-2007, 8:24 AM by sevans. 2 replies.
Sort Posts: Previous Next
  •  04-30-2007, 1:55 PM 1798

    Need help launching script or Bat file to change DNS configuration

    Hello:

    I must apologize first off as my scripting is limited

    I have a group of servers that are configured with all IP addresses manually......I have a current Primary and secondary DNS server configuration...however these Servers physical IP addresses will be changing....I have created a bat file that when executed locally will delete the entries, then add the primary and secondary servers using these commands

    netsh interface ip delete dns "LAN" all
    netsh interface ip set dns "LAN" static 10.10.4.1
    netsh interface ip add dns "LAN" 10.10.4.55

    I followed the windows media tutorial on scripting were the comand prompt opens on the remote computer....and have tried several things to get it to work...but I am failing at the following 2 areas....

     

    I can get the remote script to run but I always get prompted for a username and password.... I have added credential in the custom script Login section with domainname\username and password with domain admin rights....when I run the script I get prompted to insert the password but the domain\username is present.....as though th first password was not accepted.....when I manually type the passord it allows the script to continue...I have re-typed several times so I am almost posative the credentials are correct...

    when the script executes I am confused whether or not I need to include the bat file in the script or if I can simply run the three lines above within the script.....If I add the file, it does copy the bat file to the c:\temp\vncscan folder as the command prompt is loaded...but does not fire the bat file.....at the command prompt I can type the name of the bat file (dns.bat) and the bat file executes as it should. but how can I get the script to automatically open the command prompt, run the three lines, then close the command prompt...

  •  04-30-2007, 2:04 PM 1800 in reply to 1798

    Re: Need help launching script or Bat file to change DNS configuration

    OK

     

    I played with this a little more and have gotten it to work.....

    Password problem...

    Was not a VNCScan issue at all...rather my Domain.....the domain was upgraded from NT 4 many moons ago.....and for some reason for some particular instances....you need to use the old Netbios domain name\username...rather than domainName.com\username...VNCScan for what ever reason needs the Netbios Doamin name...go figure??

     

    Script runs as well using the bat file...these are the lines I inserted into the remote script

    c:

    cd \temp\vncscan

    dns.bat

     

    the result is it runs......executes....then closes........life is good

  •  06-08-2007, 8:24 AM 1916 in reply to 1798

    Re: Need help launching script or Bat file to change DNS configuration

    i am now doing this same task as you by changeing the dns servers on half of my computers i was able to just add these lines of codes to the script and had no problems with it at all i would like to see this be part of the program to simply add it to the computers properties page and it would run the command for me but for now just add thoses lines of code to the script and you shouldnt have any problems
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems