Batch File Won't run

spidigi

Commendable
Sep 20, 2016
6
0
1,510
Hello folks,

I just to run this batch file on Windows XP,but now i can't run it on Win10. Please help.

net use \\192.168.2.11 ********* /USER:ERC
shutdown -m \\192.168.2.11 -s -t 60 -c "Postovane kolege, racunari ce se iskljuciti za 60 sekundi, molimo vas sacuvajte sav vas rad. VAS ERC"
net use \\192.168.2.11 /DELETE

Tnx.
 

spidigi

Commendable
Sep 20, 2016
6
0
1,510


Yes I can.
 

gbb0330

Reputable
Apr 28, 2015
1,498
0
5,960
can you open \\192.168.2.11\ in a folder window?
is the ERC account enabled on 192.168.2.11, password still the same?


exactly what are you trying to do?

seems like you want to shutdown 192.168.2.11 remotely, and display a message to the users correct?

in this case all you need is shutdown -m \\192.168.2.11 -s -t 60 -c "Postovane kolege, racunari ce se iskljuciti za 60 sekundi, molimo vas sacuvajte sav vas rad. VAS ERC"

there is no need to establish connection with net use
 

spidigi

Commendable
Sep 20, 2016
6
0
1,510


I accidentally chose this answer as a solution. :/
I forgot to mention that the script sometimes wants to start. The computers are not on domein.
I deleted "net use",and now it works. :)
And yes, I can open in a window folder. :)
And yes, I want to shutdown remotely, and display a message to the users correct. :)
Thank you so much for your help, I hope it will work without problems. :)