Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
AnswerRe: kinect v2 Pin
Afzaal Ahmad Zeeshan7-Dec-16 6:42
professionalAfzaal Ahmad Zeeshan7-Dec-16 6:42 
GeneralRe: kinect v2 Pin
Member 128901729-Dec-16 22:59
Member 128901729-Dec-16 22:59 
AnswerRe: kinect v2 Pin
Eddy Vluggen7-Dec-16 7:28
professionalEddy Vluggen7-Dec-16 7:28 
GeneralRe: kinect v2 Pin
Member 128901729-Dec-16 23:04
Member 128901729-Dec-16 23:04 
AnswerRe: kinect v2 Pin
Gerry Schmitz7-Dec-16 8:22
mveGerry Schmitz7-Dec-16 8:22 
QuestionWinForms CheckFirstRun() Pin
f.loschiavo5-Dec-16 15:01
f.loschiavo5-Dec-16 15:01 
AnswerRe: WinForms CheckFirstRun() Pin
Midi_Mick5-Dec-16 15:15
professionalMidi_Mick5-Dec-16 15:15 
AnswerRe: WinForms CheckFirstRun() Pin
Jon McKee5-Dec-16 18:42
professionalJon McKee5-Dec-16 18:42 
Not sure if this'll help as I have no ClickOnce experience (WiX# <3) but if you can set certain routines to run on an install you could try to overwrite that setting during the install. Another option might be to set that setting in its own ConfigurationSection and simply do a full overwrite of that section during any installation. If you have any questions on how to do that I might be able to help since I have experience using ConfigurationManager and the various other classes to manually handle settings programmatically, but I don't know much about ClickOnce and what it allows unfortunately.

EDIT: Looking over ClickOnce, it appears you can only update files that have changed (unlike Windows Installer). This would necessitate overwriting any user settings if updating the base settings file. A solution might be to save this particular setting in its own programmatically accessed file which you can overwrite at will since the user will have no settings in it.
C#
string filePath = "/Example/Program.exe.config";
ExeConfigurationFileMap configFile = new ExeConfigurationFileMap() {ExeConfigFilename = filePath;}
Configuration config = ConfigurationManager.OpenMappedExeConfiguration(configFile, ConfigurationUserLevel.None, false);
//How to add FirstRun
config.AppSettings.Settings.Add("FirstRun", "true");
//How to set or retrieve FirstRun
config.AppSettings.Settings["FirstRun"].Value = "false";
bool firstRun = Convert.ToBoolean(config.AppSettings.Settings["FirstRun"].Value);
//Save
config.Save(ConfigurationSaveMode.Modified);

This technique allows you to have a settings file that has a manual location and is manually loaded separate from the default (and automatically handled) settings file. Change ConfigurationUserLevel enumeration and other parameters as needed Smile | :)

modified 6-Dec-16 1:17am.

AnswerRe: WinForms CheckFirstRun() Pin
f.loschiavo6-Dec-16 12:51
f.loschiavo6-Dec-16 12:51 
QuestionSetup Web Folder On IIS Pin
MadDashCoder5-Dec-16 10:49
MadDashCoder5-Dec-16 10:49 
AnswerRe: Setup Web Folder On IIS Pin
Gerry Schmitz5-Dec-16 11:59
mveGerry Schmitz5-Dec-16 11:59 
GeneralRe: Setup Web Folder On IIS Pin
MadDashCoder5-Dec-16 22:36
MadDashCoder5-Dec-16 22:36 
GeneralRe: Setup Web Folder On IIS Pin
Gerry Schmitz6-Dec-16 6:22
mveGerry Schmitz6-Dec-16 6:22 
AnswerRe: Setup Web Folder On IIS Pin
Pete O'Hanlon5-Dec-16 23:46
mvePete O'Hanlon5-Dec-16 23:46 
Questioncan some one encrypt these codes Pin
Member 128824722-Dec-16 0:51
Member 128824722-Dec-16 0:51 
AnswerRe: can some one encrypt these codes PinPopular
OriginalGriff2-Dec-16 1:02
mveOriginalGriff2-Dec-16 1:02 
GeneralRe: can some one encrypt these codes Pin
Jon McKee3-Dec-16 17:33
professionalJon McKee3-Dec-16 17:33 
AnswerRe: can some one encrypt these codes Pin
Nathan Minier2-Dec-16 1:27
professionalNathan Minier2-Dec-16 1:27 
AnswerRe: can some one encrypt these codes PinPopular
Pete O'Hanlon2-Dec-16 2:25
mvePete O'Hanlon2-Dec-16 2:25 
GeneralRe: can some one encrypt these codes Pin
OriginalGriff2-Dec-16 2:33
mveOriginalGriff2-Dec-16 2:33 
GeneralRe: can some one encrypt these codes Pin
Pete O'Hanlon2-Dec-16 2:38
mvePete O'Hanlon2-Dec-16 2:38 
AnswerRe: can some one encrypt these codes Pin
Jochen Arndt2-Dec-16 3:09
professionalJochen Arndt2-Dec-16 3:09 
AnswerRe: can some one encrypt these codes Pin
Gerry Schmitz2-Dec-16 6:45
mveGerry Schmitz2-Dec-16 6:45 
GeneralRe: can some one encrypt these codes Pin
OriginalGriff2-Dec-16 8:17
mveOriginalGriff2-Dec-16 8:17 
GeneralRe: can some one encrypt these codes Pin
Gerry Schmitz2-Dec-16 8:36
mveGerry Schmitz2-Dec-16 8:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.