Microsoft KB Archive/93027
PSS ID Number: 93027
Article Last Modified on 1/8/2003
The information in this article applies to:
- Microsoft Visual Basic for MS-DOS 1.0
This article was previously published under Q93027
It is usually possible to set LINK options by using the LINK environment variable. However, this technique cannot be used within the VBDOS.EXE programming environment.
To work around this limitation, create a new .EXE file called LINK.EXE which SHELLs to the old LINK.EXE file, and invokes the old LINK.EXE file (which has been renamed) with whatever options you would like to use.
The following steps show how to perform this type of functionality. In the following example, the "/r" LINK option is used, and the old LINK.EXE file is renamed to LINKER.EXE.
- Start VBDOS.EXE.
- From the File menu select New Form... (FORM1.FRM).
Add the following code:
PRINT "Running link in real mode." SHELL "linker /r "+command$ END
- From the File menu select Save File.
- Type LINKR.BAS as your file name, and choose OK.
- From the File menu select exit, to exit out of the environment.
- From the MS-DOS prompt, type the following commands:
BC /o linkr;
LINK /r linkr;
RENAME link.exe linker.exe
RENAME linkr.exe link.exe
You should now be able to LINK from within the VBDOS.EXE programming environment with whatever LINK options you have specified.
Additional query words: VBmsdos 1.00
Technology: kbAudDeveloper kbVB100DOS kbVBSearch kbZNotKeyword3