Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need to constantly log on many computers to configure/install/do whatever. Is there anyway I can backdoor (\\compname\c$) and make a batch file so it'll sign me on when I start the computer up? If this is possible, what would the batch commands be? My only options are using notepad so I can't use any of this fancy software I've heard remarked through these forums.
Thank you.

The answer is NO you can not do it with batch scripting because it would be a security risk to allow this. You could probably do it with VB Script. If you are not open to installing a developed backdoor then you have no options.
The solution we came up with is a Service that my programmer made that would check a SQL Server Schedule where we could pass deployment commands to. Then we installed this on every computer.
There are third party apps that will do this for you like...
http://www.softlist.net/program/rem...
but we preferred to install our own application because running third party apps could be revers engineered and have exploits.

Thank for the quick response. But, there would't be a way to make a batch file run when a computer connects to a domain (when it first turns on) would there? My main purpose right now is to run another batch file to get MAC Addresses and write them to a txt file.
Nevertheless, thanks for the help and I'm gonna show that program to my boss.

Well of course you can run a Batch file when people login. Just go into the GPO and setup a Logon Script. The problem is there is no RUNAS that will work in a batch file. You can only use RUNAS at the command prompt because you have to give it the user name and password. If the users do not have rights to install applications on their computers then you will need something that will run the apps with elevated rights.
As for logging, I use this script in my login scripts...
call \\10.100.100.7\scripts\mapdrives.vbs ADDPRINTERCONNECTION ("\\10.100.100.8\Fax") echo ************************************** >> \\10.100.100.8\share\loginlog.txt echo Logon %computername% %username% >> \\10.100.100.8\share\loginlog.txt date /t >> \\10.100.100.8\share\loginlog.txt time /t >> \\10.100.100.8\share\loginlog.txt echo ************************************** >> \\10.100.100.8\share\loginlog.txtYou could modify it to do ...
@echo off setlocal for /f "delims=" %%a in ('ipconfig /all') do call :next "%%a" goto :wrtielog :next if "%~1"=="Ethernet adapter Local Area Connection:" set NIC=1 for /f "tokens=1-3 delims=:. " %%b in ( "%~1") do call :next2 "%%b" "%%c" "%%d" goto :wrtielog :next2 if "%NIC%"=="1" if "%~1"=="Physical" if "%~2"=="Address" (set MAC=%~3&set NIC=0) :wrtielog echo ************************************** >> \\10.100.100.8\share\loginlog.txt echo Logon %computername% %username% >> \\10.100.100.8\share\loginlog.txt echo %MAC% >> \\10.100.100.8\share\loginlog.txt date /t >> \\10.100.100.8\share\loginlog.txt time /t >> \\10.100.100.8\share\loginlog.txt echo ************************************** >> \\10.100.100.8\share\loginlog.txtDon't forget you have to change My IPs with yours. I would alos suggest you put the loop that extracts the MAC from the IPCONFIG /ALL in a seperate batch file and call it like I did with my map drives script in the first example I gave you.

![]() |
ethernet controll driver
|
Help! My Hard Disk Failed...
|
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |