You are here

how to load ansi.sys?

10 posts / 0 new
Last post
ottosykora
Offline
Last seen: 18 hours 6 min ago
Joined: 2007-10-11 17:48
how to load ansi.sys?

I would like to run portable an application, somehow old thing, dos, but this needs the ansi.sys legacy driver to be loaded.

OK, under dos/w98 it is done in config.sys, I tried to do it under w2k to put it into the config.nt, but nothing works.

Can such ansi.sys driver be loaded from portable device so I could run this utility form other machines ?

digitxp
digitxp's picture
Offline
Last seen: 12 years 9 months ago
Joined: 2007-11-03 18:33
Nope

you have to have rights to get to a folder and any .sys file only works in a specified folder.

Insert original signature here with Greasemonkey Script.

Jimbo
Offline
Last seen: 4 years 4 months ago
Joined: 2007-12-17 05:43
Yes, it -can- be done

Just not easily

You will need to set up a PIF file that specifies the startup files to use for the DOS session that you use. There will be some ease-of-use issues, since there are absolute paths involved that you may need to edit if the flash drive letter changes.

There are brief instructions here : http://www.nthelp.com/40/ansiNT.htm

ottosykora
Offline
Last seen: 18 hours 6 min ago
Joined: 2007-10-11 17:48
ansi.sys port.

OK Jimbo, this might be something for the start with.

The file I need to run after that is simple dos utility for some device, but needs the ansi.sys to get correct display.

Will try to create so me bat and nt file like this and see if this will work from the stick.
The dos session should work in the dosbox, could be also the one with portableapps. should then I specify somewhere cmd instead of command.com?

Otto Sykora
Basel, Switzerland

Jimbo
Offline
Last seen: 4 years 4 months ago
Joined: 2007-12-17 05:43
uhhhh

I'm a little confused by that. The PIF file is similar to a shortcut under windows, but it has properties that allow you to specify custom startup files for a dos command. Usually, the command would be a BAT file from which you could run your utility, but command.com or cmd.exe should both work as well for interactive stuff if you specified it as the program to run.

I'm not quite sure what you mean about the one for portable apps, unless you're referring to the portable command prompt app, which I've never used, so know nothing about.

ottosykora
Offline
Last seen: 18 hours 6 min ago
Joined: 2007-10-11 17:48
will %~dp0 work?

here in this matter?

I thought by this I could make work from stick with no adjustmensts?

[Double post removed by moderator SL]

Otto Sykora
Basel, Switzerland

Jimbo
Offline
Last seen: 4 years 4 months ago
Joined: 2007-12-17 05:43
yes and no

%~dp0 will work fine in batch files or typed commands, but you won't be able to use it in the PIF file to specify the paths to the startup scripts.

However, it is just possible that you might be able to specify relative paths for them. I know that PIF files did work with relative paths back in windows 2 when I first encountered them, but that was almost two decades ago now, and things might have changed...

ottosykora
Offline
Last seen: 18 hours 6 min ago
Joined: 2007-10-11 17:48
not all seems to work

since when I create local *.nt file (=config), I can refer to it from the shortcut to my exe and specify the it as config file. If the content is loading the ansi.sys frm the system32, all works fine.

device=%systemroot%\system32\himem.sys
device=%systemroot%\system32\ansi.sys

If however I state in the *.nt (config) file real absolute adr to a local folder on my stick, it will not work properly. In fact it does load himem sys and ansi, the exe later does not run correctly. So the following does not work as expected. However, when the F:

Otto Sykora
Basel, Switzerland

ottosykora
Offline
Last seen: 18 hours 6 min ago
Joined: 2007-10-11 17:48
there is more into it

also there has to be observed that apparently 8.3 naming has to be kept here, some thing will work if all placed on root of the stick, others still not (it seems to have problem with the portabl~ directory under dos.

Otto Sykora
Basel, Switzerland

Jimbo
Offline
Last seen: 4 years 4 months ago
Joined: 2007-12-17 05:43
Yeah, this really is DOS-like

You'll need to keep that in mind throughout all of the batch files and paths that you use.

Once you're running a command prompt in this way, it drops all pretence of being windows, and tries very hard to look like DOS. This means that all paths must be short names all the way, and all the exes you run must be console mode only. At a normal command prompt on windows, you can run a native windows app just by calling it, or by using the start command. Neither of these will work from this mode of DOS prompt either.

One point : you really should be using the ansi.sys on the c: drive (the one in %SYSTEMROOT%, that is) since that is the one that shipped with that OS version, and moving your own around with you could give problems. It should be there on every version of windows that you meet, anyway.

Log in or register to post comments