>Hi all,
>
>I am trying to develop an application that will self-distribute itself and install the OCX and DLL files it needs but I don't know what syntax is or function to call to locate the System directory of the OS to copy these files to. I cannot use the Setup Wizard to generate the setup files or to install the OCX and DLL files. I need my application to do it. Can someone help me on this one?
>
Both the FAQ and the Windows API section have details on using GetSystemDirectory() to find the system directory. However, I strongly advise against using direct copying of files to the system directory; under NT. non-admin users may not have sufficient permissions to do so, Win2K won't allow a normal app copy files directly to the system diurectory, and for all platforms, you may have to use deferred copy and registration of files such as DLLs where the DLL might already be in memory, blocking any copy and registration activities. The Visual Studio Installer and most of the third-party installation packages handle these problems without you having to code for these relatively ordinary (from an installer perspective at least) problems.
In addition to VSI, I've gotten very good results from InstallShield and seen other people's results using Wise's family of installation products - I use the high-end InstallShield product since I know it and need some of the unusual features it offers; InstallShield Express is a much less expensive and simpler product that offers an easier interface, delivering 80% of the Pro product's added features, while producing a professional, polished installation package with relative ease. I've seen some really impressive work built using Wise's products, too.