• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

What is the best way to edit bat file

TaSMania

ADSM.ORG Member
#1
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?
 

moon-buddy

ADSM.ORG Moderator
#2
Replace SERVERNAME with %COMPUTERNAME% and the batch file will pickup the NetBIOS or server name. No need for prompts; just run the script.
 

TaSMania

ADSM.ORG Member
#3
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.
 

TaSMania

ADSM.ORG Member
#4
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.
 

TaSMania

ADSM.ORG Member
#5
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%
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 17 19.5%
  • Keep using TSM for Spectrum Protect.

    Votes: 53 60.9%
  • Let's be formal and just say Spectrum Protect

    Votes: 10 11.5%
  • Other (please comement)

    Votes: 7 8.0%

Forum statistics

Threads
31,472
Messages
134,143
Members
21,569
Latest member
srinathkodela
Top