CXWorld/CapFrameX

App not starting on system startup/login

jmalexan opened this issue · 9 comments

I have the option enabled to launch the app on startup (as well as the option to start it minimized) but it doesn't seem to work. RSS starts fine, but not CapFrameX. I can launch the app fine manually, it just doesn't happen automatically as expected.

Running Windows 11 Insider Beta 22623.1245.

I can provide logs, if someone tells me where to find them.

All we do with the checkbox is creating a scheduled task in windows, so once that task is sucessfully created in your Windows Taks Scheduler, it's out of our control.

I'm wondering if it's misconfigured in the Task Scheduler. I pulled it up and looked at the task, the trigger is listed as "At log on of Mandatory Label\Medium Mandatory Level", where other tasks are configured as "At log on of any user" or "At system startup". It also says it has never run. Seems like it's configured to launch when a specific user logs in, but which user is selected is misconfigured?

It's set to launch with admin rights at login of the current user that created the task

Right, but it seems like the "current user" is somehow not being correctly fetched. Instead of the task triggering off of the user "POLYGON\me", as I would expect (being my username), it's somehow registered to trigger off of "Mandatory Label\Medium Mandatory Level". See screenshot:
image
Additionally, "Mandatory Label\Medium Mandatory Level" is listed as the user account to run the task under.

If I change both of these options to "POLYGON\me", then the task works and the app launches as expected on login.

I'm only guessing, but it seems that somehow "Environment.UserName" and "Environment.UserDomainName" on

trigger.UserId = Environment.UserName;
and
Environment.UserDomainName + "\\" + Environment.UserName, null, TaskLogonType.InteractiveToken);
are not retrieving the expected values.

Is this issue reproducible anywhere else? Is this just an issue on my system?

Well at least you're the first to mention having this problem and the option is in there for quite some time now ^^

Yeah, you're right about that, I had several people verify it works for them as well and they could get it working no problem. I'm wondering if this is an issue with the insider build I'm on, but I don't know anyone else on that build, so I can't verify. I can fix the problem myself by correcting the task in the Task Scheduler, so I guess I'm good, unless someone else with the issue comes along, or someone with the insider build shows up to test.

I've tried everything I can to get it to create a correct task, save from a full Windows reset, but no avail, it always lists my user as "Mandatory Label\Medium Mandatory Level".

Yeah, considering you won't toggle the autostart on and off frequently, I'd leave it at that for now.
It took quite a few tries to get the scheduled task to the point where it's working like now and I'd rather not fiddle around with it blindly and then having it work for you but then 10 others are getting issues^^

Yeah, that's totally fair, I guess at the very least if the issue crops up as new windows builds rolls out, you'll have some info to start looking at.

Issue can not be replicated. Closed.