Tutorial: How to create and compile a batch file for SmartSDR and additional programs

  • 1
  • Idea
  • Updated 4 months ago
I wanted to create a batch file to start CAT and DAX, SmartSDR with some addidional programs
as I have encountered problems with CAT in the new version if started from the Windows autostart folder.

To run smoothly the batch file has to

1. Start CAT and DAX minimized
2. Start the programs in the correct order
3. Be compiled into an executable program to be started from the desktop or start menue.

This is the batch file I adapted from John K3MA's batch:
____________________________________________________________________________

@echo off
cd C:\Program Files\FlexRadio Systems\SmartSDR\DAX\
start DAX.lnk
cd C:\Program Files\FlexRadio Systems\SmartSDR\SmartSDR CAT\
start Cat.lnk
cd C:\Program Files (x86)\MiniDeluxe\
start MiniDeluxe.exe
cd C:\Program Files (x86)\Ham Radio Deluxe\
start HRDLogbook.exe
cd C:\Program Files (x86)\FRStack\
start FRStack.lnk
cd C:\Program Files (x86)\HamApps\JTAlert\
start JTAlert.exe /wsjtx
cd C:\Program Files\FlexRadio Systems\SmartSDR\
start SmartSDR.exe --serial=XXXX-XXXX-XXXX-XXXX
exit
____________________________________________________________________________

I created and used links for some programs to start them minimized.

The program I used to compile the batch into a 64bit EXE file is here:

http://www.f2ko.de/en/b2e.php

I use the portable 64bit version, as I don't want to install the program. Under "Programmeinstellungen" or "program settings" you can choose English language.
Under "Options" you can tick "Invisible application" and "Architecture" 32 or 64bit
for your 32 or 64bit OS. Great program, free, and without any viruses.

All this works under Windows7 64bit. I can't test it under Windows10 as I have no
computer running that OS, but it should run also.

Please tell me about any ideas you have concerning batch file improvements and
if you found any problems with Windows 10.

BTW I found that with SSDR version 1.10.8.30 FlexVSP now starts in the background
even if you don't have CAT started from the autostart folder.
I use the Fujitsu serial port viewer and terminal program to view and control my COM ports.
Photo of Alex - DH2ID

Alex - DH2ID, Elmer

  • 914 Posts
  • 169 Reply Likes
  • Flexy

Posted 2 years ago

  • 1
Photo of Larry: KE2YC

Larry: KE2YC

  • 66 Posts
  • 5 Reply Likes
Hi Alex,

Thank you very much for the post.  Brings me back to my old Dos Days and bat files to control programs and  create Menus.  Downloaded program and will be testing it soon.  Will let you know how it works

Larry ke2yc
Photo of Robbie - KI4TTZ

Robbie - KI4TTZ

  • 480 Posts
  • 77 Reply Likes
Nice script, didn't know about the --Serial parameter on smartsdr.exe.  If you're looking for a way to control the 6x00 from a script, I wrote a Powershell module for it.

https://github.com/rfoust/FlexModule

-Robbie
Photo of Alex - DH2ID

Alex - DH2ID, Elmer

  • 902 Posts
  • 167 Reply Likes
I'll look up and try your powershell script, Robbie. Sonds vy interesting!
Alex - DH2ID
Photo of Tim Lacy

Tim Lacy

  • 5 Posts
  • 0 Reply Likes

A couple of thoughts from a (don't tell anyone) 20-year Microsoft veteran:

First, I don't mean any disrespect, at all.  There is valuable stuff in your post.  In addition to all the exe's you start, I also launch DDUtil and a few others.  Your script is terrific for that.

1)  I don't see a need to create lnk files.  Just use start /MIN, should be fine if that's the goal. I wrote a lot of CMD files to manage processes when I worked on Cosmos, the backend for Bing.  When you need to delete 200 million files via command line, you need to spawn a lot of threads (actually, you just flag them as discarded and let the garbage collector grab them, but it still takes a while)

2)  I'd suggest - strongly - to move to powershell.  Much more control, direct access to .net API stuff, self-documenting, easy to turn into loadable modules, etc.

3)  It's... how to say it?  Why create an EXE from your script?  What advantage is there? I've looked into it a few times, and could never make the case that it should be done.  Just increases the maintenance overhead.

I'd be happy to talk further about this; automation is basically my career.


-T

K7GRR



Photo of Alex - DH2ID

Alex - DH2ID, Elmer

  • 902 Posts
  • 167 Reply Likes
Hi Tim, thank you for your info.

@1) I'll try that
@2) Too complicated for me, I need an easy solution
@3) I start everything from the Windows Start menue. The link to the .exe file fits there.

I tried powershell and find it interesting, but why should i use it to start SmartSDR and just a few programs? There might be a beauty to it, but that surely lies in the eyes of the beholder :-)

73, Alex - DH2ID
Photo of Tim Lacy

Tim Lacy

  • 5 Posts
  • 0 Reply Likes

True - the best solution is whatever works for you :-)

-T


Photo of Jay / NO5J

Jay / NO5J

  • 1519 Posts
  • 222 Reply Likes
I did the same with an ever evolving AutoIt script. Which works well until the spelling of the full paths to the executables change.
 
 SDRgadgets

73, Jay - NO5J

(Edited)
Photo of Mark WS7M

Mark WS7M

  • 393 Posts
  • 113 Reply Likes
You know Jay... Had you sent me that Hex beam in your garage like you promised you would have had much more time to evolve that AutoIt script into something totally useful! 

Just sayin!
Photo of Andy - KU7T

Andy - KU7T

  • 155 Posts
  • 11 Reply Likes
I played with this tonight and wanted to post the finished script, that starts CAT, DAX, SDR, DDUtil, SDRBridge, CWSkimmer, RBN, Wintelnetx, N1MM+. This gets me up and running in 1 min...  Off course some of these are optional, but thought that a few of you may be interested.

rem DAX
pushd "C:\Program Files\FlexRadio Systems\SmartSDR v1.10.16\DAX"
start "" Dax.exe /MIN
popd
timeout /t 5

rem CAT
pushd "C:\Program Files\FlexRadio Systems\SmartSDR v1.10.16\SmartSDR CAT"
start "" Cat.exe /MIN
popd
timeout /t 5

rem Flex radio start
pushd "C:\Program Files\FlexRadio Systems\SmartSDR v1.10.16\"
start "" "SmartSDR.exe"  --serial=2017-5331-6700-1665
popd
timeout /t 5

rem DDUtil
pushd C:\DDUtil_V3\
start "" DDUtil_V3.exe
popd
timeout /t 10

rem sdr bridge to launch skimmer for local band spots
pushd "C:\Program Files (x86)\W2RF\SDR-Bridge\"
start "" "SdrBridge.exe" /MIN
popd
timeout /t 5

rem RBN to post local band spots
pushd "C:\Program Files (x86)\RBN"
start "" rbn_aggregator_v4.4.exe /MIN
popd

rem wintelnetX to merge public node with local band spots
pushd "C:\Program Files (x86)\WinTelnetX"
start "" wintelnetx.exe ini\MY_skimmer_plus_node_to_logger.ini -start
popd

rem N1MM+
pushd "C:\Program Files (x86)\N1MM Logger+"
start "" N1MMLogger.net.exe
popd

Andy
Photo of Andy - KU7T

Andy - KU7T

  • 155 Posts
  • 11 Reply Likes
I have an updated to the script. It launches everything on my box now and I thought I would share it here again. Use and edit to your hearts content. The below launches all this in about 1 minute (in this order):

DXLAB, Green Heron Server, DAX, CAT, RBN, W2, PstRotatorAz, Voaprop, Wintelnetx, DDUtil, SliceMaster, Green Heron Client, SmartSDR, N1MM+


setlocal
set SmartSDRPath=C:\Program Files\FlexRadio Systems\SmartSDR v2.2.8

pushd "C:\DXLab\Launcher"
start "" "DXLabLauncher.exe"
popd
pushd "C:\Program Files (x86)\Green Heron Engineering\GH Everyware Server"
start "" "GH Everyware Server.exe"
popd
pushd "%SmartSDRPath%\DAX"
start "" Dax.exe /MIN
popd
pushd "%SmartSDRPath%\SmartSDR CAT"
start "" Cat.exe /MIN
popd
pushd "C:\Program Files (x86)\Aggregator"
start "" rbn_aggregator_v4.4 /MIN
popd
pushd "C:\Program Files (x86)\Elecraft\W2 Meter"
start "" W2.exe
popd
pushd "C:\Program Files (x86)\PstRotatorAz"
start "" "PstRotatorAz.exe"
popd
pushd "C:\Program Files (x86)\VOAProp"
start "" "VOAProp.exe"
popd

pushd "C:\Program Files (x86)\wintelnetx_4_22"
start "" wintelnetx.exe -start ini\MySkimmer_plus_W9PA_to_localhost23.ini
popd
pushd C:\DDUtil_V3\
start "" DDUtil_V3.exe

popd
pushd "C:\Program Files (x86)\slice-master-6000-v0.10.4"
start "" "slice-master.exe"
popd
pause Wait until N1MM-DXKeeper gateway and Green Heron Server are started

pushd "C:\Program Files (x86)\Green Heron Engineering\GH Everyware Client"
start "" "GH Everyware Client.exe"
popd

rem uncomment, if you want to start SmartSDR and not run the 6600M
rem pushd "%SmartSDRPath%\"
rem start "" "SmartSDR.exe"  --serial=xxxx-xxxx-xxxx-xxxx
rem popd
pushd "C:\Program Files (x86)\N1MM Logger+"
start "" "N1MMLogger.net.exe"
popd
endlocal