Generally (corporate installations excepted) one of the reasons for a portable TeX installation is the ease with which one current copy can be used on different platforms and with different editors (i.e. my requirements)
Keeping the different parts in separate folders is ideal and a top level batch file makes sense. So the typical contents of such a batch file may be
DO NOT use this one it is just an example of steps to consider
First are there additional dependencies such as Perl for latexmk or pdf viewer or converters like GS note in this first case there are NO quotes because there are no spaces
set path=%~d0\Imagemagic\imagemagick;%~d0\GS\ghostscript;%path%
Obviously MiKTeX (or TeX Live etc.) need to be on path and in this case quotes are needed because there is a space
set PATH="%~d0\MiKTeX app\texmfs\install\miktex\bin;%path%"
You will need something to let you update MiKTeX on the fly etc and the simplest is to let it run in the background (remember this is not a working example use your own paths)
start "" "%~d0%~p0texmfs\install\miktex\bin\miktex-console.exe" --hide --mkmaps
Lastly we need our editor (perhaps with optional variable for drag and drop a tex file)
"%~d0\tex studio\texstudio2.12.14\texstudio.exe" "%1"
It is useful to keep the dos console open to allow command line usage or checking
So a final line could be
%comspec% /k
makeindex
or do you rely that the program is found within your $PATH variable? – book Dec 2 '18 at 13:15