Example #1
0
//----------------------------------------------------------------------------
//                                                              LinkToUserData
//----------------------------------------------------------------------------

/*
 *   LinkToUserData() inserts a link from the static installation INI file to
 *   the editable user configuration file. The [AppInstall] section is a
 *   predetermined name which is required by this deployment application in
 *   order to function correctly.
 */
        private void LinkToUserData()
        {
            CLibIniFile oStaticIni;

            oStaticIni = new CLibIniFile(mstrSoftware, mstrIni);
            oStaticIni.SetString(EnumSections.AppInstall, EnumKeys.UserData, mstrData);
            oStaticIni.SetString(EnumSections.AppInstall, EnumKeys.Version, mstrVersion);
// Check if only allowing the current user to run the application
            if (rbPrivate.Checked)
            {
                oStaticIni.SetString(EnumSections.AppInstall, EnumKeys.Account, mstrAccount);
            }
            else
            {
                oStaticIni.SetString(EnumSections.AppInstall, EnumKeys.Account, "");
            }
        }