I'm glad you've gotten it sorted out. I started using .conf files to launch Dos games. What I do is enter dosbox command prompt from RetroPie and start the game from there, keeping track of the command I entered. Then I add those to commands to gamename.conf below [autoexec].
I use the games from eXoDOS collection since it uses the "best" version available. It also has a pre-configured *.conf file as well as all the game files pre-installed in it's own folder. You must make sure to change usescancodes=trueto usescancodes=false to make sure input works correctly. Other information will already be set up such as machine type (machine=vga) which can sometimes cause a headache trying to figure out.
Here is an example Star Trek - 25th Anniversary (1992).conf I based the autoexec off of another CD based game-Fallout 1.
[sdl]
fullscreen=false
fulldouble=false
fullresolution=original
windowresolution=original
output=overlay
autolock=true
sensitivity=100
waitonerror=true
priority=higher,normal
mapperfile=mapper-0.74.map
usescancodes=false
[dosbox]
language=
machine=vga
captures=capture
memsize=64
[render]
frameskip=0
aspect=true
scaler=normal2x
[cpu]
core=auto
cycles=max
cycleup=500
cycledown=20
[mixer]
nosound=false
rate=44100
blocksize=2048
prebuffer=10
[midi]
mpu401=intelligent
device=default
config=
[sblaster]
sbtype=sb16
sbbase=220
irq=7
dma=1
hdma=5
mixer=true
oplmode=auto
oplrate=44100
[gus]
gus=true
gusrate=44100
gusbase=240
irq1=5
irq2=5
dma1=3
dma2=3
ultradir=C:\ULTRASND
[speaker]
pcspeaker=true
pcrate=44100
tandy=auto
tandyrate=44100
disney=true
[joystick]
joysticktype=auto
timed=true
autofire=false
swap34=false
buttonwrap=true
[serial]
serial1=dummy
serial2=dummy
serial3=disabled
serial4=disabled
[dos]
xms=true
ems=true
umb=true
keyboardlayout=none
[ipx]
ipx=false
[autoexec]
MOUNT -u C
MOUNT C /home/pi/RetroPie/roms/pc/
c:
IMGMOUNT D /st25/cd/Star Trek 25th.cue -t cdrom
cd st25 > NUL
STARTREK
exit
I haven't tried this .conf yet but what I would do if it didn't work would be to try those commands manually and copy over the changes.
Lastly, sometimes entering setup again is all that is need.