Jump to content

2 DOS commands in 1 line with wait? function [Solved]


Akarillon
 Share

Recommended Posts

I need help with a DOS line I am trying to send to another computer.
I am using a program called psexec to connect to another computer on my domain and perform a cmd-command on that computer remote.
The software works great, but when I try to automate this and put both commands in 1 line it wont work

example:
psexec hostname cmd
(this starts the service and after 5-10 seconds it is ready)

then I want it to do this command after loading is done:
net localgroup administrators username /add

but when I try these two commands together it wont start the second command. both & and && wont work.

Kind Regards,
Akarillon

Edited by Jon

Challenge accepted!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...