Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows cannot find '%1=C:\WINDOWS\System32\drivers\etc\hosts'. #61

Open
azumukupoe opened this issue Feb 1, 2022 · 5 comments
Open
Assignees
Labels

Comments

@azumukupoe
Copy link

this shows up when trying to open the hosts file but the file "C:\Windows\System32\drivers\etc\hosts" exists

@ScriptTiger
Copy link
Owner

Just to clarify, you are talking about the final prompt the script gives you after it has finished running and offers to open your hosts file, right?

Does the update process succeed and have you manually opened the hosts file yourself to verify the update was successful? The only issue is just that the script cannot successfully open your hosts file?

Can you replicate the issue and copy and paste all of the output here?

@ScriptTiger ScriptTiger self-assigned this Feb 2, 2022
@ScriptTiger ScriptTiger added the bug label Feb 2, 2022
@azumukupoe
Copy link
Author

PS C:\ProgramData\chocolatey\lib\unified-hosts-autoupdate\tools\Unified-Hosts-AutoUpdate-master> .\Hosts_Update.cmd
Initializing...
Checking connectivity to raw.githubusercontent.com...                                                                   raw.githubusercontent.com reached successfully                                                                          Your current script version is 1.50                                                                                     Checking for script updates...                                                                                          Your script is up to date
You currently have a scheduled task already in place
Would you like to run the current task now? [Y,N]?Y
Activating update task...
SUCCESS: Attempted to run the scheduled task "Unified Hosts AutoUpdate".
Update task is running...
Update task has completed
Would you like to open your current hosts file before exiting? [Y,N]?Y
File type 'AppX4ztfk9wxr86nxmzzq47px0nh0e58b8fw' not found or no open command associated with it.
The system cannot find the file %1=C:\WINDOWS\System32\drivers\etc\hosts.
Cleaning temporary files...

@ScriptTiger
Copy link
Owner

Can you confirm you are using Notepad++ as your default text editor? If not, can you tell me what your default text editor is?

Can you also tell me what operating system you are using?

Can you run the following command, then copy and paste the output here?
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\UserChoice /v PROGID

@azumukupoe
Copy link
Author

azumukupoe commented Feb 5, 2022

I do use Notepad++ but it's not set as default

I'm using Windows 11 Pro 22000.469

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.txt\UserChoice
PROGID REG_SZ AppX4ztfk9wxr86nxmzzq47px0nh0e58b8fw

@ScriptTiger
Copy link
Owner

I'll let this issue sit for a while and see if others have any input.

There are several different ways Windows displays the application name, sometimes just putting the common name, sometimes prepending "Applications", and sometimes using another unique application identifier, and even the same applications can be presented differently depending on if they were installed through the Microsoft Store, using a downloaded installer, or if they were a downloaded package not requiring installation.

Can anyone confirm that apps on Windows 11 have a standard to start with "App", followed by 33 ASCII characters? If not, what's the new standard? I don't have a Windows 11 to play with at the moment, but I'll definitely revisit this as soon as I do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants