variables in batch files

Thresh

Contributor
Veteran XX
I forgot, please help me remember.

Doing some registry slipstreaming automation, and I just need a few lines in a batch file to do it for me.
 
heh, I need it to be something like, i type the bat file name, and the variable (computer name) and it does some commands to that machine...

so... how do I do that? :)
 
Here it is, my pride and joy.

Code:
rem Small little utility to remotely edit the neccessary registry
rem key in windows XP, to allow remote desktop connections.
rem After it completes that, it will automagically launch a RDP
rem connection to that computer. You will need pstools from
rem [url]http://www.sysinternals.com/files/Pstools.zip[/url]
rem 
rem Type the command as such: term compname
rem
xcopy c:\terminal.reg \\%1\c$\ /c /y
psexec \\%1 -u administrator -p passwword -d regedt32.exe /s c:\terminal.reg
mstsc /v:%1 /f

Here is the reg key to slip
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server]
"fDenyTSConnections"=dword:00000001
 
Back
Top