help createprocess for fullscreen dos application

I am having trouble consistantly starting a DOS application in fullscreen mode using the CreateProcess method.  The code that follows works on my NT machine, but will not open the application in fullscreen mode on the very similar machines of my workmates (although it will open the app in a window).  I have compared kernel32 on all machines and it is the same size and date.
Can anyone tell me what I am doing wrong and how to correct it?

        sLINKInfo.cb = Len(sLINKInfo)
        If CreateProcess(vbNullString, _
                         "c:\linkpc\prod\lmn\lmn000mp.exe c: 1 t a", _
                         ByVal 0&, _
                         ByVal 0&, _
                         1&, _
                         NORMAL_PRIORITY_CLASS, _
                         ByVal 0&, _
                         "c:\linkpc\prod\lmn\", _
                         sLINKInfo, _
Who is Participating?

Improve company productivity with a Business Account.Sign Up

wsh2Connect With a Mentor Commented:
Ok... From MSDN.. <smile>

Setting Properties for MS-DOS - Based Applications

In Windows 95, the properties sheets replace PIF Editor, which was used in earlier versions of Windows to optimize settings for MS-DOS - based applications.

To view or modify the properties settings for an MS-DOS - based program
Right-click the icon for the program, and then click Properties. (If the program's icon is not on the Windows 95 desktop, use Windows Explorer to find the program, then right-click the icon in Windows Explorer.) This displays the properties sheets for the program.
Click the tab you want to use and change the options as appropriate. (See the following section for information about all of these options.)
Do the same for all other options and tabs, and then click OK.
MS-DOS - based programs have six properties sheets - General, Program, Font, Memory, Screen, and Misc.

Use the General properties to see information about the type, size, and location of the MS-DOS - based application. From this properties sheet, you can turn on and off the Read Only, Archive, Hidden, and System attributes, which have the same meaning as they do in MS-DOS.

Caution Do not change file attributes unless you are absolutely sure of what you are doing.

General properties for an MS-DOS - based application

Use the Program properties to identify details about how the program will be run.

Program properties for an MS-DOS - based application

 Include the filename for the application.
Command Line
 Type the full command line, including the correct drive, path, and options, to run this application.
 Specify the working directory.
Batch File
 Type the name of a batch file you want to run before the program starts.
Shortcut Key
 Specify the key combination (if any) that you want to use to quickly switch to this application.
 Choose whether to run the program in a normal-sized window, a maximized window, or a minimized window.
Close on Exit
 Check this box if you want the window to close once the MS-DOS - based program has ended.

Use the Advanced command button to specify information about the mode in which your program will run.

Advanced properties for an MS-DOS - based application

Prevent MS-DOS - based Programs From Detecting Windows
 Check this box to hide Windows 95 from MS-DOS-based applications for those applications that cannot run or that perform poorly if they detect the presence of Windows 95.
Suggest MS-DOS Mode As Necessary
 Check this box to allow Windows 95 to detect whether MS-DOS-based applications run best in MS-DOS Mode. If it detects such an application, Windows 95 runs a wizard to set up a custom command to run the application.
 Check this box to run this program in exclusive MS-DOS Mode. No other processes are allowed to run simultaneously if you use this option.
Warn Before Entering MS-DOS Mode
 Check this box to enable the automatic warning presented when Windows 95 is about to run an application that requires MS-DOS Mode and must shut down all other applications. If this option is checked, Windows 95 will warn the user before beginning the shutdown process.
Specify A New MS-DOS Configuration
 Check this box to edit the CONFIG.SYS and AUTOEXEC.BAT files in the corresponding text boxes or by clicking the Configuration button.
 Type any lines you want to add to CONFIG.SYS to allow this application to run properly. This version of CONFIG.SYS is used only for the MS-DOS Mode session in which this application runs.
 Type any lines you want to add to AUTOEXEC.BAT for this application. This version of AUTOEXEC.BAT is used only for the MS-DOS Mode session in which this application runs.

As shown in the preceding table, you can set the path for a specific MS-DOS - based application that runs in MS-DOS Mode in the AUTOEXEC.BAT box. For MS-DOS - based applications that don't run in MS-DOS Mode, you can only set a working directory. You can set a global path for all MS-DOS - based applications by adding a path statement in AUTOEXEC.BAT. You can also write a batch file that sets a path for an MS-DOS - based application; for example:

After you write the batch file, create a shortcut to your MS-DOS - based application, and specify the batch file's path and name in the Batch File field of the Program properties.

From the Font properties, you can specify the font size and type to be used when the MS-DOS - based program runs. From Font properties, you can also preview how the program window and the font will appear.

Font properties for an MS-DOS - based application

From the Memory properties, you can define the following memory allocation options:

Conventional memory, which consists of the first 640K of memory available on your computer.
Expanded memory, which can be installed as an expanded memory card or emulated by an expanded memory manager (EMM). EMM software maps pages of expanded memory onto the system's upper memory area.
Extended memory, which is essentially a seamless upward extension of the original 1-MB address space available in the memory of 80286 and 80386 computers. Extended memory always starts at exactly 1024K, where the upper memory area ends.
MS-DOS protected-mode memory, which Windows 95 automatically provides as expanded memory for MS-DOS - based applications that require it to run. It cannot provide this memory, however, if you include a statement in CONFIG.SYS that loads EMM386.EXE with the noems parameter. Use the ram parameter when loading EMM386.EXE in CONFIG.SYS, or use the x=mmmm-nnnn statement to allocate enough space in the upper memory area for Windows 95 to create an EMS page frame.
Using Upper Memory Blocks (UMBs) and High Memory Area (HMA) are two ways to free conventional memory for use by MS-DOS - based applications, and thus improve performance. In conventional memory, UMBs are the unused part of upper memory from 640K to 1 MB, where information can be mapped to free memory below 640K. HMA is the first 64K of extended memory, where drivers can be loaded to free conventional memory.

Memory properties for an MS-DOS - based application

From the Screen properties, you can specify options for how the application will be displayed.

Screen property sheet for an MS-DOS - based application

 Specify whether the application will run in a window with an initial size you can specify, a full-screen window, or a window with a size automatically determined by the graphic mode it uses.
 Choose whether to display a toolbar or to preserve the previous Windows 95 window settings.
 Choose Dynamic Memory Allocation to use the Windows 95 video ROM-handling capabilities. Choose Fast ROM Emulation to enable VxD emulation of selected video ROM services and to speed up video operations, particularly text output.

From the Misc properties, you can specify details about running your program in the foreground and in the background. You can specify whether your program must have exclusive access to the system when it is in the foreground and whether running a screen saver is allowed when the program is active. You can also specify whether the program must be suspended when it is in the background.

In addition, you can specify preferences for mouse, idle sensitivity, Windows hot keys, and other options.

Miscellaneous properties for an MS-DOS - based application

In Windows 95, the Properties dialog box replaces PIF Editor, which was used in earlier versions of Windows to optimize the settings for MS-DOS - based applications.

For information about changing the properties for executable files, look up "file properties, changing" in the Windows 95 Help Index.

For Help on the Properties dialog box of an executable file, click the question mark button at the top of the dialog box, and then click the item you want information about.
First understand what your command line is doing.. as you are executing a DOS program.. the true explicit line of execution is..

C:\COMMAND.COM /K c:\linkpc\prod\lmn\lmn000mp.exe c: 1 t a

The problem you are having is that the default Command.Com settings are not set for Full Screen. As of this very moment.. I am uncertain on how to tell you to change them.. But fear not.. I shall return.. <smile>.
<sighing>.. Well it was fun while it lasted.. I tried Pifs.. Bats.. and pretty much got the same results as the writer did.. <groan>. Its obvious that Command.Com is launching another  process and that the maximized settings are not being passed to the child. At this moment.. I say to "SHELL" with it, and will let others comment.. <smile>.
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!


Isn't shell sufficient?  The second parameter in shell specifies the open mode, eg hidden, full screen, etc.
FWAllan: Do you see another option button just above "Answer"?
mike_kAuthor Commented:
OK, Looks like all that I needed to do was to change the property of the executable and run the create process as I had listed it.  I don't know why I had to chnage the executable property, but I'll settle for that for now.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.