microsoft / microsoft/WindowsAppSDK

Set winui app auto start will occure the explorer shell error

Open
#6,411 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-External
Dominant language
C++
Stars
4.7k
Forks
471
Avg merge
3d 13h
Merged PRs (30d)
28

Description

### Describe the bug

I use the Task Scheduler to manage the winui app to start as a admin or not. But I always meet the error when it is not "Run with highest privileges", which is used shell to start the winui app.
The most situation:
Image
rare situation:
Image

Image
Tip: You can't just use the winui app exe path the same as the normal exe path under without admin, but you can with the admin.

### Steps to reproduce the bug

The creation logic: https://github.com/SnapHutaoRemasteringProject/Snap.Hutao.Remastered.Native/blob/master/src/Snap.Hutao.Remastered.Native/HutaoNative.cpp#L35-L753
The app call:
https://github.com/SnapHutaoRemasteringProject/Snap.Hutao.Remastered/blob/main/src/Snap.Hutao.Remastered/Snap.Hutao.Remastered/ViewModel/Setting/SettingViewModel.cs

### Expected behavior

_No response_

### Screenshots

_No response_

### NuGet package version

1.8.260317003

### Packaging type

Packaged (MSIX)

### Windows version

Insider Build (xxxxx)

### IDE

_No response_

### Additional context

What should I do?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the creation logic in src/Snap.Hutao.Remastered.Native/HutaoNative.cpp and the app call in src/Snap.Hutao.Remastered/Snap.Hutao.Remastered/ViewModel/Setting/SettingViewModel.cs. Reproduce the packaged app launch through Task Scheduler with and without “Run with highest privileges,” then compare the reported shell errors. Done requires a confirmed cause and a clearly verified non-admin launch behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, csharp
Domain
desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.