Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

System File Not Suitable

Status
Not open for further replies.

audiopro

Programmer
Apr 1, 2004
3,165
GB
We have a home produced EPOS system written in VFP6 and operating on 4 WIN XP PC's in 4 seperate locations. Each evening, all the machines perform an auto backup to server via a scheduled task running a VFP .EXE.
This process involves using PKZIP to zip up several files for upload to the server.

This has worked ok on 3 of the machines but the 4th. is giving us problems.
The problem machine:-
Originally worked ok but stopped performing the upload and started to report the following error.
Code:
c:\WINDOWS\SYSTEM32\CMD.EXE
C:\WINDOWS\SYSTEM32\AUTOEXEC.NT
The system file is not suitable for 16 bit applications.
Overwriting Windows solved the problem and was ok for a while. The problem has returned and we are seeking a lasting solution.
It is is in a remote location and I will not be able to visit for a few days.
I assume it is caused by some 'update' re-writing autoexec.NT but was looking for some advice on what change could cause this. I don't think it is malicious but there are no guarantees.
The EPOS prog includes a low level receipt creation routine and a
Code:
! copy file receipt to LPT1
command.
This routine shows the same error but only on the first till openeing since a re-start. Subsequent receipt production shows no errors at all.


Keith
 

Keith,

Are you saying that you have included Autoexec.NT and Cmd.EXE in with the files that you want to back up? If so, why would you want to do that? These files are part of Windows, and would not normally change (in theory, a user or application might change Autoexec.NT, but that would be a system-level change, and have nothing to do with your application).

Unless you have a good reason for backing up these particular files on a regular basis, I suggest you leave them out of your routine backup process.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Also, the AUTOEXEC.NT file is a text file, so you should be able to look into it with a text editor to see how it differs from such on a computer that has no problems.

- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
I am only reporting the error as it is showing itself.
Mike
A scheduled task runs a VFP .EXE prog which zips 4 files, 2 tables and their indexes:- astock.dbf, astock.cdx, repairs.dbf, repairs.cdx. and FTP's them up to the server.
It is during the calling of PKZIP via ! (run) where the error ocurrs.
Autoexec.NT and CMD.exe are never mentioned except for the fact that the run command is being issued.

Bill
As I mentioned, this is in a remote location so I am unable to look at the file at the moment.

Is there an updated version of CMD.EXE which only works with 32 bit objects?

The whole process works faultlessly on the 3 other machines
so something is being altered on this one. The question is, what?

Keith
 
As I mentioned, this is in a remote location so I am unable to look at the file at the moment.

I thought it might be easy to get the customer to email you the autoexec.nt file... I thought that you might not realize how easy it is to open and view the file to evaluate it for changes.

You might try running COMMAND.COM instead of CMD.EXE .. they differ in many ways; I'm not really sure how that affects VFP's "!" command.

You might try an alternative to
! copy file receipt to LPT1

which wouldn't use the "!" ... maybe an API call to CopyFile (this is untested):
Code:
DECLARE INTEGER CopyFile in Win32API ;
  STRING @ LPCTSTR_lpExistingFileName, ;
  STRING @ LPCTSTR_lpNewFileName, ;
  INTEGER BOOL_bFailIfExists
nRes = CopyFile( cDataDir+'receipt', 'LPT1', 0 )


- Bill

Get the best answers to your questions -- See FAQ481-4875.
 

Keith,

I'm getting confused. You said:

Autoexec.NT and CMD.exe are never mentioned except for the fact that the run command is being issued.

But you mentioned these files in your original post. Where are you seeing the names of these two files?

If it is PKZIP that is reporting the error, what happens if you run PKZIP directly from Windows (or DOS) rather than via the VFP Run command?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Thanks for your help guys but it's all got a little confused - let me try to recap the problem.

The content of the 'code box' in my original post is the error which appears in a grey box in the centre of the screen when I attempt to run my upload routine on one particular machine. This same routine runs without problems on three other computers at different locations and has been doing so for several months. (WIN XP SP2).
The computer which we are experiencing problems with was, up until recently, running the upload routine without problems. The routine zips 4 files and FTP's them to a server.

I am not trying to back up AUTOEXEC.NT or CMD.EXE nor are these files mentioned in any of my code, they are only mentioned in the Windows error message.

As I see it, there is a file on the rogue computer which supported 16 bit apps. but has been updated, changed or corrupted and now only supports 32 bit apps.
I need to ID which file that is - any suggestions?

Friday is the earliest I can get the file.
I was hoping you guys had encountered this problem before.


Keith
 
For reference:-
Code:
c:\WINDOWS\SYSTEM32\CMD.EXE
C:\WINDOWS\SYSTEM32\AUTOEXEC.NT
The system file is not suitable for 16 bit applications.
is Microsoft's way of saying that AUTOEXEC.NT is missing.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top