0

I wrote a command to save credentials for several machines but it looks like NET USE has a very large delay and does not fit well in this scenario, the following is the command im using:

for /L %a in (1, 1, 100) do ping -n 1 st%a && net use \\st%a\c$ password /USER:st%a\user

The command tries to ping the machine to see if it is online and then saves default credentials for future access, but since NET USE is quite slow this task takes too long.

I have to store credentials without checking it (it's an internal network and passwords are default), it is acceptable to use other commands but i would like to avoid third party tools if possible.

It looks like control userpasswords2 does this without any checking but i need a solution that can be scripted.

I need a way to store credentials as fast as possible.

2
  • I see a lot of: I did this, and I found out that, but there's one thing you completely forgot to add. What exactly is your question?
    – LPChip
    Jan 26, 2016 at 19:59
  • I guess it was pretty obvious that the command is just too slow to loop it 100 times, but i edited the question as asked Jan 26, 2016 at 22:07

0

You must log in to answer this question.

Browse other questions tagged .