1.

Solve : running bat on remote machine?

Answer»

Hi-
I am running batch file A on one machine that calls a batch file B on another machine. Batch file B reads and returns registry settings, but currently it's READING the registry settings on machine A. I need it to read the settings on machine B instead. How can I do this when the initial batch file that is run in on machine A?
Thanks!
I'm not sure I understand the question. It sounds like you want to run BatchFileA on MachineA that reads and returns registry settings on MachineB?

What is your OS? If Windows XP/2003, try this:
Code: [Select]@echo off
reg query \\MachineB\hklm\system\currentcontrolset\control\computername\activecomputernameReplace MachineB and the registry key with what you really want. Or post more information or your code if this is not what you were looking for.
If you want a remote comptuer to run a batch file, look at the built-in commands AT or SCHTASKS, or download SOON.EXE from Microsoft.Cool. Your first suggestion will do the trick.

However, I need to first get permission. Is there some way I can do that? In other words, machine A does not yet have permission to access machine B in that way.

Is there a way to MAP to the registry or pass credentials or SOMETHING?
THanks!I don't think there is a way to pass credentials. You will have to create a MATCHING username and password and run using the matching account.
Would you mind giving me a little more detail on what you mean?
Thanks for the help!Let's say MachineA is going to be running the batch file logged in as user "miles99" that has a password of "abc123". If you create a new user on MachineB with a username of "miles99" that has a password of "abc123" and make that user a local administrator, then the batch file should run.

The REG command is designed to be used on remote machines by administrators. So a company that has a server that users log into will all be accessable by the administrator user, and the REG command could be used on those remote machines without modifications.



Discussion

No Comment Found