Skip to content

Commit a765b5c

Browse files
committed
v1.4.3 update
1 parent d480e40 commit a765b5c

13 files changed

+43
-23
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.

Advanced Installer/Advanced Installer.aip

+4-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
77
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
88
<ROW Property="AI_FINDEXE_TITLE" Value="Select the installation package for [|ProductName]" ValueLocId="AI.Property.FindExeTitle"/>
9-
<ROW Property="AI_PROPPATH_DIR_PERBUILD_AssistantComputerControl.exe" Value="..\AssistantComputerControl\bin\Debug"/>
10-
<ROW Property="AI_PROPPATH_DIR_PERBUILD_AssistantComputerControl.exe.config" Value="..\AssistantComputerControl\bin\Debug"/>
9+
<ROW Property="AI_PROPPATH_DIR_PERBUILD_AssistantComputerControl.exe" Value="..\AssistantComputerControl\bin\Release"/>
10+
<ROW Property="AI_PROPPATH_DIR_PERBUILD_AssistantComputerControl.exe.config" Value="..\AssistantComputerControl\bin\Release"/>
1111
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Microsoft.Win32.TaskScheduler.dll" Value="..\packages\TaskScheduler.2.8.20\lib\net452"/>
1212
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Microsoft.WindowsAPICodePack.Shell.dll" Value="..\packages\Microsoft.WindowsAPICodePack.Shell.1.1.0\lib"/>
1313
<ROW Property="AI_PROPPATH_DIR_PERBUILD_Microsoft.WindowsAPICodePack.dll" Value="..\packages\Microsoft.WindowsAPICodePack.Core.1.1.0\lib"/>
@@ -34,7 +34,6 @@
3434
<ROW Property="ARPCOMMENTS" Value="The software that lets you control your computer using your personal assistants (Amazon Alexa or Google Assistant)" ValueLocId="*"/>
3535
<ROW Property="ARPCONTACT" Value="https://twitter.com/ACC_HomeAlexa"/>
3636
<ROW Property="ARPHELPLINK" Value="https://assistantcomputercontrol.com/#get-in-touch"/>
37-
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1"/>
3837
<ROW Property="ARPNOREPAIR" MultiBuildValue="DefaultBuild:1"/>
3938
<ROW Property="ARPPRODUCTICON" Value="logo_ico.exe" Type="8"/>
4039
<ROW Property="ARPURLINFOABOUT" Value="https://assistantcomputercontrol.com/"/>
@@ -159,7 +158,7 @@
159158
<ROW BootstrOptKey="GlobalOptions" DownloadFolder="[AppDataFolder][|Manufacturer]\[|ProductName]\prerequisites" Options="2"/>
160159
</COMPONENT>
161160
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
162-
<ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFileName="ACCsetup" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="..\..\ACC stuff\Images\Icons\logo_ico.ico" UseLargeSchema="true" ExeName="ACCsetup" UACExecutionLevel="2"/>
161+
<ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFileName="ACCsetup" Languages="en" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="..\..\..\..\..\Desktop\logo_ico - Copy.ico" UseLargeSchema="true" ExeName="ACCsetup" UACExecutionLevel="2"/>
163162
</COMPONENT>
164163
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
165164
<ROW Path="&lt;AI_DICTS&gt;ui.ail"/>
@@ -274,7 +273,7 @@
274273
<ROW Feature_="MainFeature" Component_="bootstrap.min.old.css"/>
275274
</COMPONENT>
276275
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
277-
<ROW Name="logo_ico.exe" SourcePath="..\..\ACC stuff\Images\Icons\logo_ico.ico" Index="0"/>
276+
<ROW Name="logo_ico.exe" SourcePath="..\..\..\..\..\Desktop\logo_ico.ico" Index="0"/>
278277
</COMPONENT>
279278
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
280279
<ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel &lt;&gt; 5)" Sequence="210"/>

AssistantComputerControl/MainProgram.cs

+32-17
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* AssistantComputerControl
33
* Made by Albert MN.
4-
* Updated: v1.4.3, 20-04-2021
4+
* Updated: v1.4.3, 21-04-2021
55
*
66
* Use:
77
* - Main class. Starts everything.
@@ -27,7 +27,7 @@
2727
namespace AssistantComputerControl {
2828
class MainProgram {
2929
public const string softwareVersion = "1.4.3",
30-
releaseDate = "2021-04-20 23:18:00", //YYYY-MM-DD H:i:s - otherwise it gives an error
30+
releaseDate = "2021-04-21 00:33:00", //YYYY-MM-DD H:i:s - otherwise it gives an error
3131
appName = "AssistantComputerControl",
3232

3333
sentryToken = "super_secret";
@@ -39,6 +39,7 @@ class MainProgram {
3939
testingAction = false,
4040
aboutVersionAwaiting = false,
4141
hasAskedForSetupAgain = false,
42+
hasStarted = false,
4243
reopenSettingsOnClose = false;
4344

4445
public TestStatus currentTestStatus = TestStatus.ongoing;
@@ -72,8 +73,6 @@ static void Main(string[] args) {
7273
Console.WriteLine("Log location; " + logFilePath);
7374
CheckSettings();
7475

75-
76-
7776
var config = new NLog.Config.LoggingConfiguration();
7877
var logfile = new NLog.Targets.FileTarget("logfile") { FileName = logFilePath };
7978
var logconsole = new NLog.Targets.ConsoleTarget("logconsole");
@@ -121,7 +120,7 @@ void ActualMain() {
121120
}
122121
}
123122
} catch (Exception e) {
124-
Console.WriteLine("Error getting settings from older versions of ACC" + e.Message);
123+
Console.WriteLine("Error getting settings from older versions of ACC; " + e.Message);
125124
}
126125
/* End "copy settings" */
127126

@@ -214,10 +213,6 @@ void ActualMain() {
214213
handler = new ConsoleEventDelegate(ConsoleEventCallback);
215214
SetConsoleCtrlHandler(handler, true);
216215

217-
//Check if software starts with Windows
218-
if (!ACCStartsWithWindows())
219-
sysIcon.AddOpenOnStartupMenu();
220-
221216
//Create shortcut folder if doesn't exist
222217
if (!Directory.Exists(shortcutLocation)) {
223218
Directory.CreateDirectory(shortcutLocation);
@@ -271,7 +266,7 @@ void ActualMain() {
271266
watcher.Created += new FileSystemEventHandler(new ActionChecker().FileFound);
272267
watcher.Renamed += new RenamedEventHandler(new ActionChecker().FileFound);
273268
watcher.Deleted += new FileSystemEventHandler(new ActionChecker().FileFound);
274-
watcher.Error += delegate { DoDebug("Something wen't wrong TEST"); };
269+
watcher.Error += delegate { DoDebug("Something wen't wrong"); };
275270

276271
DoDebug("\n[" + messageBoxTitle + "] Initiated. \nListening in: \"" + CheckPath() + "\" for \"." + Properties.Settings.Default.ActionFileExtension + "\" extensions");
277272

@@ -305,6 +300,22 @@ void ActualMain() {
305300
//If newly updated
306301
if (Properties.Settings.Default.LastKnownVersion != softwareVersion) {
307302
//Up(or down)-grade, display version notes
303+
DoDebug("ACC has been updated");
304+
305+
if (Properties.Settings.Default.LastKnownVersion != "" && new System.Version(Properties.Settings.Default.LastKnownVersion) < new System.Version("1.4.3")) {
306+
//Had issues before; fixed now
307+
DoDebug("Upgraded to 1.4.3, fixed startup - now starting with Windows");
308+
309+
try {
310+
RegistryKey rk = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
311+
rk.DeleteValue(appName, false);
312+
} catch {
313+
DoDebug("Failed to remove old start with win run");
314+
}
315+
316+
SetStartup(true);
317+
}
318+
308319
Properties.Settings.Default.LastUpdated = DateTime.Now;
309320
if (gettingStarted != null) {
310321
DoDebug("'AboutVersion' window awaits, as 'Getting Started' is showing");
@@ -316,6 +327,10 @@ void ActualMain() {
316327
Properties.Settings.Default.Save();
317328
}
318329

330+
//Check if software starts with Windows
331+
if (!ACCStartsWithWindows())
332+
sysIcon.AddOpenOnStartupMenu();
333+
319334
/* 'Evalufied' user feedback implementation */
320335
if ((DateTime.Now - Properties.Settings.Default.LastUpdated).TotalDays >= 7 && Properties.Settings.Default.TimesOpened >= 7
321336
&& gettingStarted == null
@@ -346,6 +361,7 @@ void ActualMain() {
346361
ActionMods.CheckMods();
347362
TaskSchedulerSetup();
348363

364+
hasStarted = true;
349365
SystemEvents.SessionSwitch += new SessionSwitchEventHandler(SystemEvents_SessionSwitch); //On wake up from sleep
350366
Application.Run();
351367
}
@@ -631,14 +647,11 @@ public static void SetStartup(bool status, bool setThroughSoftware = false) {
631647
//Create "Task Scheduler" service; run ACC on startup & log on, added by Shelby Marvell
632648
try {
633649
using (TaskService ts = new TaskService()) {
634-
var ps1File = Path.Combine(MainProgram.currentLocation, "ExtraCleanupper.ps1");
635-
636650
TaskDefinition td = ts.NewTask();
637-
td.Principal.LogonType = TaskLogonType.S4U;
651+
td.Principal.LogonType = TaskLogonType.InteractiveToken;
638652
td.Principal.RunLevel = TaskRunLevel.Highest;
639653
td.RegistrationInfo.Author = "Albert MN. | AssistantComputerControl";
640654
td.RegistrationInfo.Description = "AssistantComputerControl startup - Runs ACC on reboot/login";
641-
td.Triggers.Add(new BootTrigger());
642655
td.Triggers.Add(new LogonTrigger());
643656
td.Actions.Add(new ExecAction(Application.ExecutablePath, null, null));
644657

@@ -742,8 +755,9 @@ private static bool PathIsFile(string path) {
742755

743756
public static void DefaultPathIssue() {
744757
//Path is program root - most likely an error, alert user
745-
//new Thread(() => {
746758
DialogResult dialogResult = MessageBox.Show("It seems the path to the cloud service wasn't set correctly. Choose \"Yes\" to go through the setup again. If this doesn't work, try restarting the ACC software.", "Whoops, problem!", MessageBoxButtons.YesNo);
759+
DoDebug(dialogResult.ToString());
760+
747761
if (dialogResult == DialogResult.Yes) {
748762
Properties.Settings.Default.HasCompletedTutorial = false;
749763
Properties.Settings.Default.ActionFilePath = "";
@@ -755,7 +769,6 @@ public static void DefaultPathIssue() {
755769

756770
ShowGettingStarted();
757771
}
758-
//}).Start();
759772
}
760773

761774
public static string CheckPath() {
@@ -777,7 +790,9 @@ public static string CheckPath() {
777790
}
778791
}
779792

780-
if (gettingStarted is null && path == currentLocation && !hasAskedForSetupAgain) {
793+
if (hasStarted && gettingStarted is null && path == currentLocation && !hasAskedForSetupAgain) {
794+
DoDebug("Did it here");
795+
781796
hasAskedForSetupAgain = true;
782797
DefaultPathIssue();
783798
}

AssistantComputerControl/WebFiles/AboutVersion.html

+7-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<img style="width:125px;position:fixed;bottom:0;left:0;margin-left:20px;" src="assets/images/acc_logo.png">
2424
</div>
2525
<div class="col-9">
26-
<b>Version 1.4.2</b> <i>(18-04-2020)</i>
26+
<b>Version 1.4.3</b> <i>(20-04-2021)</i>
2727
<p>
2828
<a href="https://assistantcomputercontrol.com/">Website</a> |
2929
<a href="https://github.com/AlbertMN/AssistantComputerControl">GitHub</a> |
@@ -33,6 +33,12 @@
3333
<b>New this version;</b>
3434
<div class="scroller card card-body">
3535
<ul>
36+
<li>
37+
<i>Version 1.4.3 hotfix notes;</i>
38+
<ul>
39+
<li>Fixed <b>start with windows</b> feature</li>
40+
</ul>
41+
</li>
3642
<li>
3743
<i>Version 1.4.2 hotfix notes;</i>
3844
<ul>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)