MK-2 Posted March 2, 2007 Posted March 2, 2007 First, thanks to Chris for recommending AutoIT. It's great for what I need. The problem I have is, when creating a user in my batch file, I run two commands that need to be run on the server itself, MKDIR and NET SHARE. All other commands can be run remotely, but those two mean I need to be on the server itself to run the batch file. Is there any way of running the commands remotely so I don't have to be sat on the server? This is the full syntax I'm running for each: mkdir "c:\Users\Students\Pupil Home\2006\%106%2" net share %106%2="c:\Users\Students\Pupil Home\2006\%106%2" The %1 and %2 are the first initial and last name when running the batch file. It all works fine from the server, but I've tried changing c:\ to \\server\c$\ and it doesn't like it. If I can find a way to be able to run those commands successfully from, say, my machine then it makes adding users a helluva lot easier.
mattx Posted March 2, 2007 Posted March 2, 2007 I remember back in the good old days of Warp Server it was a simple command line of stating what server you were going to run the command on - if memory serves me right: net admin \\servername /net user %name% /add Not sure if RExec would work for windows PCs... I just RDP and run my stuff. http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/rexec.mspx?mfr=true As for AutoIT, been using it since Ver 2. ;-) One of the best scripting tools out there I think.
mattx Posted March 2, 2007 Posted March 2, 2007 Just checking out PsExec that Webman posted - looks better than RExec. I'll be looking into that myself when I get a spare 10 mins...
NetworkGeezer Posted March 2, 2007 Posted March 2, 2007 Also most popular remote control programs (Net Support, NetOp etc) do have an option to run single commands on controlled PCs. You don't get a shell as such. You could use a batch file or EXE wrapprt such as a compiled AutoIt script to get round this limitation.
MK-2 Posted March 2, 2007 Author Posted March 2, 2007 grrrrrr. i actually have pstools installed on my machine and totally forgot about that. NetworkGeezer: That's what I'm trying to do, get the command working so I can compile it in an AutoIT I'll put a psexec command in, canny believe I missed it :oops:
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now