Day 307
This code works unless, it is run on a Windows 10 version 1903 machine.
#CodingPhase #TheCodingWay #365CodingPhaseChallenge
**********
private void SWWSsave()
{
if (chkBxSWWS.Checked)
{
if (Properties.Settings.Default.UPT)
{
reg.SetValue("Time Clock Entry 4", Application.ExecutablePath.ToString() + " RPT"); // Add program to startup with Windows RunProfileTimes
}
else if (Properties.Settings.Default.SNTAS)
{
reg.SetValue("Time Clock Entry 4", Application.ExecutablePath.ToString() + " RCT"); // Add program to startup with Windows RunCustomTimes
}
else
{
reg.SetValue("Time Clock Entry 4", Application.ExecutablePath.ToString()); // Add program to startup with Windows
}
}
if (!chkBxSWWS.Checked)
{
reg.DeleteValue("Time Clock Entry 4", false); // remove program from startup with Windows
}
}
#CodingPhase #TheCodingWay #365CodingPhaseChallenge
**********
private void SWWSsave()
{
if (chkBxSWWS.Checked)
{
if (Properties.Settings.Default.UPT)
{
reg.SetValue("Time Clock Entry 4", Application.ExecutablePath.ToString() + " RPT"); // Add program to startup with Windows RunProfileTimes
}
else if (Properties.Settings.Default.SNTAS)
{
reg.SetValue("Time Clock Entry 4", Application.ExecutablePath.ToString() + " RCT"); // Add program to startup with Windows RunCustomTimes
}
else
{
reg.SetValue("Time Clock Entry 4", Application.ExecutablePath.ToString()); // Add program to startup with Windows
}
}
if (!chkBxSWWS.Checked)
{
reg.DeleteValue("Time Clock Entry 4", false); // remove program from startup with Windows
}
}
Comments
Post a Comment