Microsoft KB Archive/172319: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
Line 45: Line 45:
== SUMMARY ==
== SUMMARY ==


The SYS(2033,n) returns the path information for either the System folder, Extensions folder, Preferences folder, or the Microsoft folder. The value of "n" determines the folder and the path being returned.
The SYS(2033,n) returns the path information for either the System folder, Extensions folder, Preferences folder, or the Microsoft folder. The value of "n" determines the folder and the path being returned.


</div>
</div>
Line 65: Line 65:
</div>
</div>
For example, in FoxPro 2.6a for the Macintosh, the SYS(2033,1) function can be used in conjunction with the SET LIBRARY TO command to point to the FoxTools.mlb file in the Preferences folder.
For example, in FoxPro 2.6a for the Macintosh, the SYS(2033,1) function can be used in conjunction with the SET LIBRARY TO command to point to the FoxTools.mlb file in the Preferences folder.
<pre class="codesample">  SET LIBRARY TO SYS(2033,2)+&quot;:FoxTools.mlb&quot;
<pre class="codesample">  SET LIBRARY TO SYS(2033,2)+":FoxTools.mlb"
   ? SET(&quot;LIBRARY&quot;)  &amp;&amp;&amp; Returns FoxTools.mlb
   ? SET("LIBRARY")  &amp;&amp;&amp; Returns FoxTools.mlb
                 </pre>
                 </pre>



Revision as of 11:06, 21 July 2020

Knowledge Base


How To Determining Paths of Operating System Folders

Article ID: 172319

Article Last Modified on 7/1/2004



APPLIES TO

  • Microsoft FoxPro 2.6a Professional Edition for Macintosh
  • Microsoft Visual FoxPro 3.0 for Macintosh



This article was previously published under Q172319

SUMMARY

The SYS(2033,n) returns the path information for either the System folder, Extensions folder, Preferences folder, or the Microsoft folder. The value of "n" determines the folder and the path being returned.

MORE INFORMATION

Often, the exact path to a particular folder on the machine needs to be known. For example, FoxPro 2.6a for the Macintosh places the FoxTools.mlb file in the Extensions folder. Since both hard drive names and folder names can vary between machines, there is no way to hard code a path that would work on all machines. The SYS(2033,n) function is useful in determining this information.

According to the Help File, the SYS(2033,n) function has four values for the numeric expression n. These values and the folders they return are:

0 System Folder
1 Extensions Folder
2 Preferences Folder
3 Microsoft Folder


For example, in FoxPro 2.6a for the Macintosh, the SYS(2033,1) function can be used in conjunction with the SET LIBRARY TO command to point to the FoxTools.mlb file in the Preferences folder.

   SET LIBRARY TO SYS(2033,2)+":FoxTools.mlb"
   ? SET("LIBRARY")  &&& Returns FoxTools.mlb
                

REFERENCES

Microsoft Visual FoxPro Help file
Microsoft FoxPro Help file


Additional query words: Extensions System Preferences Microsoft

Keywords: kbhowto KB172319