help with creating a batch script!!
Posted: 21 Jul 2010 13:02
hey guys, so i'm a noob to batch scripting and i'm trying to figure out how to write a script for work. basically what i need it to do is run through a loop of IP Addresses.
so for example if the ip list contained 127.1.1.1 and 127.1.1.2.
the script would take 127.1.1.1 and run the command systeminfo[.exe] [/s Computer [/u User [/p Password]]]
it would then have to insert the current ip it's working with into the computer field for that command. the user and password fields are the same for all machines. so the command would look something like this
systeminfo[.exe] [/s 127.1.1.1 [/u User [/p Password]]]
after running that command with the current ip of 127.1.1.1 i'd need it to stick the output to a file, say 127.1.1.1.txt
it would then move on to the next ip in the list, which is 127.1.1.2 and do the same thing.
i don't know if this is even possible but if anybody has suggestions i'd appreciate it! thanks!
so for example if the ip list contained 127.1.1.1 and 127.1.1.2.
the script would take 127.1.1.1 and run the command systeminfo[.exe] [/s Computer [/u User [/p Password]]]
it would then have to insert the current ip it's working with into the computer field for that command. the user and password fields are the same for all machines. so the command would look something like this
systeminfo[.exe] [/s 127.1.1.1 [/u User [/p Password]]]
after running that command with the current ip of 127.1.1.1 i'd need it to stick the output to a file, say 127.1.1.1.txt
it would then move on to the next ip in the list, which is 127.1.1.2 and do the same thing.
i don't know if this is even possible but if anybody has suggestions i'd appreciate it! thanks!