+ Post New Thread
Results 1 to 7 of 7
Windows Thread, Running local commands remotely in Technical; First, thanks to Chris for recommending AutoIT. It's great for what I need. The problem I have is, when creating ...
  1. #1

    MK-2's Avatar
    Join Date
    Oct 2006
    Location
    Nottingham
    Posts
    3,237
    Thank Post
    149
    Thanked 581 Times in 307 Posts
    Blog Entries
    8
    Rep Power
    200

    Running local commands remotely

    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.

  2. #2

    webman's Avatar
    Join Date
    Nov 2005
    Location
    North East England
    Posts
    8,406
    Thank Post
    639
    Thanked 961 Times in 661 Posts
    Blog Entries
    2
    Rep Power
    324

    Re: Running local commands remotely


  3. #3

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740

    Re: Running local commands remotely

    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/d....mspx?mfr=true

    As for AutoIT, been using it since Ver 2. ;-)
    One of the best scripting tools out there I think.

  4. #4

    mattx's Avatar
    Join Date
    Jan 2007
    Posts
    9,240
    Thank Post
    1,058
    Thanked 1,068 Times in 625 Posts
    Rep Power
    740

    Re: Running local commands remotely

    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...

  5. #5

    Join Date
    Feb 2006
    Posts
    1,187
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Running local commands remotely

    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.

  6. #6

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,620
    Thank Post
    648
    Thanked 1,619 Times in 1,449 Posts
    Rep Power
    421

    Re: Running local commands remotely

    I use Xcmd

    Ben

  7. #7

    MK-2's Avatar
    Join Date
    Oct 2006
    Location
    Nottingham
    Posts
    3,237
    Thank Post
    149
    Thanked 581 Times in 307 Posts
    Blog Entries
    8
    Rep Power
    200

    Re: Running local commands remotely

    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 ops:

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 7
    Last Post: 26th February 2010, 10:00 AM
  2. Running RIS Remotely and Automatically?
    By Zoom7000 in forum Windows
    Replies: 8
    Last Post: 1st April 2008, 12:54 PM
  3. Add local users to xp home remotely
    By adamyoung in forum Windows
    Replies: 4
    Last Post: 28th June 2007, 10:56 AM
  4. Remotely configure local policy?
    By starscream in forum Wireless Networks
    Replies: 12
    Last Post: 27th June 2007, 01:32 PM
  5. unix and sql commands
    By danIT in forum General Chat
    Replies: 9
    Last Post: 14th February 2007, 01:19 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •