-
-
Notifications
You must be signed in to change notification settings - Fork 528
Open
Description
Describe the bug
Command line arguments are ignored on Cold Start unless the file has been previously opened (likely added to FutureAccessList). It seems broadFileSystemAccess capability is not functioning correctly during the initial launch activation.
Detailed Findings:
-
Permission Dependency (The Core Issue):
notepads "C:\NewFile.txt"(A file never opened before) -> Fails. Opens an empty "Untitled" window.- However, if I drag & drop this file into Notepads once (granting explicit permission), subsequent CLI commands
notepads "C:\NewFile.txt"WORK perfectly, even on Cold Start.
-
Path Dependency:
- Files in restricted paths (e.g.,
C:\README.txt) fail consistently on the first try. - Some files in user directories might open, suggesting a race condition in permission resolution.
- Files in restricted paths (e.g.,
Steps to reproduce
- Create a text file in a root or protected location (e.g.,
C:\Test.txt) that Notepads has never seen. - Terminate Notepads completely (I executed
taskkill /F /IM Notepads.exeto ensure no background instances remained). - Run
notepads "C:\Test.txt"via Command Prompt. - Result: Empty "Untitled" window opens. (Silent permission failure?)
- Verification: Drag and drop
C:\Test.txtinto the window. Close the app. Run the command again. -> Result: It opens successfully.
Environment
- App Version: v1.5.6.0
- OS: Windows 11 Pro 24H2 (OS Build 26100.7623)
Troubleshooting attempted (Detailed)
I have tried all of the following steps, but the "Cold Start" issue persists:
1. Execution Methods:
- Tested via CMD, PowerShell (
Start-Process -ArgumentList), and AutoHotkey. - Tested with
start "" notepads "path"to handle quoting. - Confirmed that
notepads.exepath is correct usingwherecommand (no path hijacking). - Confirmed that
explorer.exe "file.txt"works (because Explorer handles the activation).
2. App & System Settings:
- Privacy Settings: Confirmed "File system" access is toggled ON in Windows Settings.
- App Maintenance: Performed "Repair" and "Reset" in App Settings.
- Reinstall: Completely uninstalled, rebooted, and reinstalled the app.
- Execution Aliases: Toggled "App execution aliases" OFF and ON again.
3. Advanced Activation Tests:
- Direct PFN Launch: Tried launching via Package Family Name (
Start-Process shell:AppsFolder\JackieLiu.Notepads_... -ArgumentList ...). Result: Empty window. - Manifest Re-registration: Ran PowerShell command:
Get-AppxPackage *Notepads* | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register ...}. Result: Issue persists.
4. Logs & Permissions:
- Event Viewer: Checked
Microsoft-Windows-TWinUI/Operational. NO error events were recorded (The OS considers the activation successful). - User Context: Confirmed I am NOT running the terminal as Administrator (ruled out UIPI/Privilege Isolation issues).
5. Isolation Tests (Crucial Findings):
- Non-existent files:
notepads C:\GhostFile.txt-> Opens empty "Untitled" (Argument ignored, no error). - Protected Paths: Files in
C:\root fail consistently on cold start. - Granting Permission: Once a file is Dragged & Dropped into the window, subsequent CLI commands for that specific file work perfectly (verifying
FutureAccessListbehavior).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels