hello everybody, I am trying to setup a bat file that will search for the computer name, then go to the corresponding point in that bat file. So for example, if the computers name is bill, I need the bat file to find the computers name (not just for bill), then go to the point that "bill" is listed in that file. I need this as I need to change computers (over 200), net configuration and i would like to have it done all by bat file. I know the code for the net config, just need the code for this. Please please please can someone help me . Lunar21
You could use something like goto aa%Computername% :aa echo error - computername not set goto :end :aaMachine1 echo Welcome to box 1 goto :end :end rem cleanup stuff
This will find the computer name and organization by querying the registry, then assign variables to them.. If bill is the computername, Code: @echo off :begin goto %computername% :bill (net config) goto [wherever] :jim (netconfig) goto [wherever] :error echo %computername% not in database. No changes made. pause exit