HELP PLZ: Dos to call host name in text file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
kevinbarker
Posts: 7
Joined: 06 Mar 2012 08:02

HELP PLZ: Dos to call host name in text file

#1 Post by kevinbarker » 17 Dec 2012 06:17

We currently have a number of network devices for example

NAS1
NAS2

They all have software on, that we use to go onsite to install software via a scrip, it would be nice to have a batch script to call the host name in the text file to save me editing 10+ devices with

:script
net use Z: /d /y
net use Z: \\nas1\ /USER:XXXX XXXX /y

See where i create a static link to nas1, would be nice for that to point to a text file,

Hope that makes scene ?

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: HELP PLZ: Dos to call host name in text file

#2 Post by Squashman » 17 Dec 2012 06:53

Will there be multiple host names in the file or just one host name?

kevinbarker
Posts: 7
Joined: 06 Mar 2012 08:02

Re: HELP PLZ: Dos to call host name in text file

#3 Post by kevinbarker » 17 Dec 2012 06:56

Just the one

So NAS1 will have a text file called nas1.text & in thats text file the host name called NAS1 ?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: HELP PLZ: Dos to call host name in text file

#4 Post by foxidrive » 17 Dec 2012 07:11

Do you want to store the username and password in the text file on each NAS?

Where will the batch file be? It can't be on the NAS itself because the NAS isn't mapped at that stage.

Post Reply