How to create a . bat to run network file

Asked

Viewed 4,621 times

1

bat that is locally on a network of multiple computers, one has a record label and the others do not, the one that does not have the record company I use one . bat with the following code via local network, to retrieve the files from the cds.

net use d: /del /y
net use d: \\lab05\d /y

I wanted to know how to run the label on all machines at once, they all have this . but I need to open one by one, what I was trying to do was something like this. bat

net use H: \\pc01\lab05.bat
net use I: \\pc02\lab05.bat
net use J: \\pc03\lab05.bat

only I don’t know if the net use works exactly that way.

I can create shared folders between these computers, it would be like doing a remote access but only to open this one. bat that is on the desktop.

1 answer

3

You can install the Psexec and then run the command remotely.

psexec \\pc01 C:\Users\NomeDoUsuario\Desktop\lab05.bat
psexec \\pc02 C:\Users\NomeDoUsuario\Desktop\lab05.bat
psexec \\pc03 C:\Users\NomeDoUsuario\Desktop\lab05.bat

Browser other questions tagged

You are not signed in. Login or sign up in order to post.