VOGONS


Autoexec not working

Topic actions

First post, by Alarion

User metadata
Rank Newbie
Rank
Newbie

Hey guys,

I recently installed DosBox on my notebook running Windows Vista Home Premium (works for me so far, surprising as it may seem).
All's fine and running, with one exception: the autoexec-commands.
I configured the lines in the autoexec part of the dosbox.conf, but it just won't run. I even used the conf-file from my work station, no success with that either. I'm have no idea whatsoever could cause this. Everything is perfectly fine (alle the commands work when prompted manually after startup), but the stupid autoexecs won't be executed. I'm clueless.
I'll upload my dosbox.conf so you can have a look, it may be that I missed a mistake. I'm no expert, but I configured DosBox several times before and thought I knew what I needed to use it. You may notice the custom commands for Master of Orion 2, but I disable most of them anyway. Just handy for network play.
Well, thanks for your attention and hopefully your help in advance, it is really annoying to enter 5+ lines after each startup.

Alarion

Reply 1 of 15, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie

Hmm....

[autoexec] […]
Show full quote

[autoexec]

# Lines in this section will be run at startup.

mount C C:\Games

C:

keyb gr

# Add these for MoO2

# cd...

# cd orion2

# ipxnet connect 192.168.2.125

# orion2~1

You folder "C:/games" will not be mounted?
DOSBox don't switch to drive C: and won't run the keyb command?
Be sure, there is a keyb application in your c:/games folder.
When using 0.70 or newer, you may set "keyboardlayout=gr" in the DOS section of the config file instead of calling it in the AUTOEXEC section.
The # comments the lines, these will not be executed.

Klimawandel.

Reply 2 of 15, by Alarion

User metadata
Rank Newbie
Rank
Newbie

Yeah, on startup none of the commands is executed. The commands all _do_ work, just not automatically. If I enter them manually all's fine, but the purpose of the autoexec's is to have them executed automatically, isn't it?
And yeah, the lines with # aren't supposed to be run, that's right, that's intentionally.
The keyboard application is there, too.

Only problem here: it won't execute automatically. Everything else works.

Reply 3 of 15, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

is it loading THAT dosbox.conf? Where is it located on your hard drive and (questions to other users) where is it supposed to be on Vista?
On XP dosbox.conf is supposed to be in the folder where dosbox is installed to UNLESS you are starting a game per drag'n'drop, then the conf needs to be in the folder of the game.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 4 of 15, by Alarion

User metadata
Rank Newbie
Rank
Newbie

It's in the same folder where it first was: in the installation folder. (Under C:\Program Files\DosBox to be precise). As it was created there when installing, I just edited it from there...

Reply 5 of 15, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Put a "pause" right after the mount and see if the mount succeeds.
If the pause isn't executed you're editing the wrong dosbox.conf

Reply 6 of 15, by Alarion

User metadata
Rank Newbie
Rank
Newbie

Hm, no, it is not executing the pause. It does says in the status window however:
"CONFIG:Loading primary settings from config file C:\Program Files\Dosbox-0.72\dosbox.conf".
That's the file I did edit. ..

Reply 7 of 15, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

You can't edit files in Program Files unless you run the program you used to edit it as Administrator or you changed the permissions on the folder. If you don't do those things then the program you used to edit the file should automagically save it to your Documents folder.

How To Ask Questions The Smart Way
Make your games work offline

Reply 8 of 15, by Alarion

User metadata
Rank Newbie
Rank
Newbie

Oh my god, I found the mistake. When accessing the file, stupid Vista will give me some copy I can't distinguish from the original. I edited _that_ one with the standard notepad.
The real one, however, could only be accessed after browsing the folder with an external viewer _and_ editor (winscp in my case). Seems Vista's user security is working too well...
I feel embarassed and stupid. Tried for hours, however, and found that out only now. Pretty stupid feature of Vista, simply denying access would be more intelligent...

Thanks for your help anyway, and you might want to make a note in the documentation about this. It's really hard to notice this if you're new to Vista.

Edit: I was an admin, and I had sufficient rights to edit. Funny that Vista would hand a ghost file over to my text editor that doesn't appear nowhere in my personal folders and is restored when i load it again. And if I say funny I really mean idiotic. Duh.

Reply 9 of 15, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

It could be consider a bug in Vista-DOSBox that it doesn't check for the "ghost" version of dosbox.conf.

In fact, I consider it a bug.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 10 of 15, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

How exactly do you check for a file that's most likely in some temporary
directory with a cryptic name?

Reply 11 of 15, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

wd - I don't have Vista, and I haven't looked into the mechanism used, but I think I read something about a shadow "ProgramFiles" folder being created somewhere inside the users Documents and Settings" foilder. I don't think it has a cryptic name at all.

Edit: Okay, found something -
http://www.west-wind.com/WebLog/posts/5584.aspx
http://juice.altiris.com/article/2665/folder- … s-windows-vista

Looks like the shadow (or virtual) dosbox.conf file would be in Users\xxxxx\AppData\Local\Microsoft\VirtualStore\Program Files\DOSBox x.xx\dosbox.conf.

I am sure there is some API that can generate the VirtualStore path for easy access.

Last edited by MiniMax on 2007-12-11, 21:26. Edited 2 times in total.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 12 of 15, by avatar_58

User metadata
Rank Oldbie
Rank
Oldbie
MiniMax wrote:

wd - I don't have Vista, and I haven't looked into the mechanism used, but I think I read something about a shadow "ProgramFiles" folder being created somewhere inside the users Documents and Settings" foilder. I don't think it has a cryptic name at all.

I have Vista and I've never heard of this. You have the standard AppData folder, but no duplicate program files folder.

Oh my god, I found the mistake. When accessing the file, stupid Vista will give me some copy I can't distinguish from the original. I edited _that_ one with the standard notepad.
The real one, however, could only be accessed after browsing the folder with an external viewer _and_ editor (winscp in my case). Seems Vista's user security is working too well...

So in your external viewer do both show up? I don't quite understand what is happening here. Do you have UAC enabled or disabled?

Reply 14 of 15, by MiniMax

User metadata
Rank Moderator
Rank
Moderator
wd wrote:

That's supposed to be transparent to both the user and the app.

I agree, it should be transparent. And in most cases it probably is, but maybe some combination of installing as Admin, editing as User, and again running as Admin in order to mount a C:\Games folder "hides" the User folder?

One more link I found:
http://juice.altiris.com/article/2665/folder- … s-windows-vista

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 15 of 15, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

As avatar_58 noted, the logic of program files and application data is way
more strict under vista, the configuration files should go into some different
directory (AppData\whatever or so).