What is the best way to edit bat file

TaSMania

ADSM.ORG Member
Joined
Nov 17, 2015
Messages
126
Reaction score
1
Points
0
So I have installation bat file.
tsmservice.bat
Code:
cd "c:\program files\tivoli\tsm\baclient"
dsmcutil install scheduler /name:"TSM Backup Scheduler" /node:SERVERNAME /password:SERVERNAME /clientdir:"c:\program files\tivoli\tsm\baclient" /optfile:"c:\program files\tivoli\tsm\baclient\dsm.opt" /autostart:no /startnow:no
dsmcutil install cad /name:"TSM Client Acceptor" /cadschedname:"TSM Backup Scheduler" /optfile:"c:\program files\tivoli\tsm\baclient\dsm.opt" /node:SERVERNAME /password:SERVERNAME /autostart:yes /startnow:yes
dsmcutil install remoteagent /name:"TSM Remote Client Agent" /node:SERVERNAME /password:SERVERNAME /optfile:"c:\program files\tivoli\tsm\baclient\dsm.opt"  /startnow:no
rather than open - edit - find/replace - save - excute, what is the way(language) to script this? I like a popup or prompt asking for SERVERNAME and automatically fills it in and start running after hitting OK.

powershell?
words/excel?
Batch, how?
 
Replace SERVERNAME with %COMPUTERNAME% and the batch file will pickup the NetBIOS or server name. No need for prompts; just run the script.
 
Wow, I actually got what I want but this is good/new to know.

This is what I add to the line 'set /p server=Enter Server Name:'
but I like that using computername instead.

Thanks much.

Replace SERVERNAME with %COMPUTERNAME% and the batch file will pickup the NetBIOS or server name. No need for prompts; just run the script.
 
Ok going back to my initial topic. For my configuration(dsmutil) to work I need correct dsm.opt.

How do I script dsm.opt to change the server name or to add a line needed?

Trying to get this automated as much as possible.
 
for servers without dsm.opt
this way works but just wondered any easy way?
what if I just wanted to change the node name incase they rename the server?
Code:
echo NODENAME  %COMPUTERNAME% >>%file%
echo TCPSERVERADDRESS ISP003.PRINCIPAL.COM >>%file%
echo TCPPORT   1500 >>%file%
echo. >>%file%
echo TCPWINDOWSIZE  63 >>%file%
echo TCPBUFFSIZE  512 >>%file%
echo TXNBYTELIMIT  2097152>>%file%
echo LARGECOMMBUFFERS no >>%file%
echo TCPNODELAY  yes >>%file%
echo QUERYSCHEDPERIOD 2 >>%file%
echo SCHEDMODE  POLLING >>%file%
echo MAXCMDRETRIES  9 >>%file%
echo COMMRESTARTDURATION 360 >>%file%
echo COMMRESTARTINTERVAL 60>>%file%
echo PASSWORDACCESS  GE NERATE >>%file%
echo COMPRESSION  no >>%file%
 
Back
Top