PDA

View Full Version : HOWTO: Install Files to the Windows Directory



Support
09-18-2002, 03:33 PM
<HTML><HEAD><TITLE>HOWTO: Install Files to the Windows Directory</TITLE></HEAD><BODY><h3>HOWTO: Install Files to the Windows Directory</h3><b>Document ID: IR02001</b><hr>The information in this article applies to:<ul><li>Setup Factory 6.0</li></ul><hr><h3>SUMMARY</h3><p>This article describes how to install files to the Windows\System directory.</p><h3>DISCUSSION</h3><p>All Windows operating systems have a "Windows" directory (folder) where most of the operating system and many shared files on the operating system are stored. Normally this directory is either located at <code>"C:\Windows"</code> (Windows 95,98,ME) or <code>"C:\WINNT"</code> (Windows NT,2000,XP), although it can be located elsewhere.</p><p>Normally, it is not necessary to install your program's files to the Windows directory or a subdirectory of the Windows directory. Here are a few cases in which you may need to do so:</p><ul><li>You are installing a shared DLL or OCX (ActiveX control) on the system (usually to the Windows\System directory.)</li><li>You are installing a font. (usually to the Windows\Fonts directory.)</li><li>You are installing a screen saver.</li><li>You are installing a control panel application.</li><li>You are installing a program that needs to be in the system path so that it can be run without a directory specifier.</li></ul><p>Of course, there are other reasons as well, but they are less common. As a rule, if you do not have a good reason for installing to the Windows directory or a subdirectory of the Windows directory, don't.</p><p>All of that being said, to tell Setup Factory to install a file to the Windows directory, do the following:</p><ul><li>Select the file that you want to install to the Windows directory on Setup Factory's main screen and select <b>Edit | File Properties</b> from the menu.</li><li>Go to the General tab of the <i>File Properties</i> screen.</li><li>Set the <b>Install file to this location</b> field to be "%WinDir%" (no quotes) and click OK.</ul><p>%WinDir% is Setup Factory variable that represents the user's Windows directory at design-time. We need to use a variable because at design-time we do not know what the user's Windows directory will be at run-time. When the user runs your install on their system, the variable will expand to the proper directory and the file will be installed there.</p><p>If the file that you are installing is a shared DLL (a file that is used by more than one program), make sure that you turn on the <b>Shared/System File</b> option on the Advanced tab of the <i>File Properties</i> screen. This will ensure that your uninstall program does not remove the file if it is being used by other programs.</p><h3>MORE INFORMATION</h3><p>Read the topics in the <b>Command Reference | Variables</b> book of the Setup Factory 6.0 online help for more information about variables.</p><p>KEYWORDS: Windows directory, %WinDir%, Shared files, DLL, OCX</p><hr><FONT SIZE=1>Last reviewed: September 18, 2002<br>Copyright 2002 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br></FONT></BODY></HTML>