//---------------------------------------------------------------------------- // 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, ""); } }
//---------------------------------------------------------------------------- // DoSelectFolders //---------------------------------------------------------------------------- private void DoSelectFolders() { string strAppend; // Set up form btnInstall.Enabled = true; // Load deployment configuration moDeployIni = new CLibIniFile(mstrWorking, "Deployment.ini"); mstrManufac = moDeployIni.GetString(EnumSections.Target, EnumKeys.Manufacturer); mstrProduct = moDeployIni.GetString(EnumSections.Target, EnumKeys.Product); mstrVersion = moDeployIni.GetString(EnumSections.Target, EnumKeys.Version); mstrIni = moDeployIni.GetString(EnumSections.Target, EnumKeys.Ini); mstrDeploy = moDeployIni.GetString(EnumSections.Target, EnumKeys.DeployUsing); // Append manufacturer and product strAppend = $"\\{mstrManufac}\\{mstrProduct}"; mstrCommon += strAppend; mstrPrivate += strAppend; mstrSoftware += strAppend; // Assign software product details to visible controls tbTitle.Text = "Install " + moDeployIni.GetString(EnumSections.Target, EnumKeys.Title); tbVersion.Text = "Version " + mstrVersion; // Display OS environment DisplayFolders(); }