venerdì 17 giugno 2022

BackgoundTaskHost continua a riavviarsi (backgroundTaskHost reboot itself)

Dopo l'ultimo update di giugno 2022 di Windows 10 (KB5014699) ho notato tramite Process Explorer che il servizio backgroundTaskHost continua a riavviarsi e ad ogni chiusura il Werfault si avvia per segnalare l'errore in un ciclo senza fine.

Cercando online il servizio backgroundTaskhost viene identificato come appartenente a "Cortana" ma nonostante io abbia disattivato l'attivazione di Cortana tramite voce il problema non si è risolto. Guardando la descrizione della Command Line (vedi screenshot sopra) il servizio in questione è generato da "MicrosoftOfficeHub" e quindi per eliminare la problematica ho proceduto tramite Powershell a rimuovere il pacchetto integrato Microsoft (senza che l'installazione di Office sul mio pc fosse corrotta):

get-appxpackage|?{$_.packagefullname-like'*MicrosoftOfficeHub*'}|remove-appxpackage

Inoltre ho proceduto anche con la disintallazione tramite Powershell con prilivegi da amministratore della funzione YourPhone (che io non utilizzo) integrata in Windows 10 tramite il seguente codice:

 Get-AppxPackage Microsoft.YourPhone -AllUsers | Remove-AppxPackage
e qualora voleste controllare tutta la lista delle applicazioni preinstallate in Windows 10 basterà lanciare:

Get-AppxProvisionedPackage -Online | format-Table DisplayName, PackageName

 

Fonti (sources):
Faulting Application backgroundtaskhost 

Elenco di tutte le app di cui è stato effettuato il provisioning

Remove Click-To-Run Office (MS Store version) (and other crap) From New PCs

This article is property of PC Wizard wroted by Michele (Italy). Please don't copy and paste without mentioning the blog and the author.
or use the QR code:
QR code 

 

sabato 21 maggio 2022

Synaptics Touchpad: problema con la barra di scorrimento laterale

Con l'update auomatico del driver di Windows Update il TouchPad Synaptics dei PC HP (in particolare nel mio caso un HP Pavilion DV8 1010el) funziona parzialmente e la barra laterale di scorrimento delle pagine posta sul lato destro del ToucPad smette di funzionare ed inoltre l'icona nel tray di sistema non mostra il tocco.

 Il driver "più recente" che non presenta questo problema è quello HP SP45019 (Version 13.2.4.12) che viene sostituito da Windows Update ma perdendo le funzionalità descritte sopra.

Una volta disinstallato il driver malfunzionante ed aver installato il driver funzionante HP dobbiamo assicurarci che Windows Update non vada di nuovo a sostituirlo con il driver successivo che presenta il problema. La procedura da seguire è la seguente:


Dopo aver disinstallato il driver di Windows Update riavviare il sistema disattivando la connessione internet e reinstallare il driver Synaptics di HP (che permette di utilizzare la scroll bar laterale a differenza di quello di Windows Update).

- Poi vai su:

Gestione dispositivi -> Mouse e altri dispositivi di puntamento -> Synaptics PS/2 Port TouchPad -> Proprietà -> Dettagli -> ID hardware

- copia le stringhe sotto "Valore", in questo caso:

ACPI\VEN_SYN&DEV_1E0F
ACPI\SYN1E0F
*SYN1E0F

- apri start e digita "gpedit.msc" e premi Invio.

- Nella finestra Criteri di gruppo, nel riquadro a sinistra, visualizza in dettaglio Configurazione computer> Modelli amministrativi> Sistema> Installazione dispositivo> Restrizioni di installazione dispositivo. Sulla destra, trova l'elemento "Impedisci l'installazione di dispositivi che corrispondono a uno di questi ID" e fai doppio clic su di esso.
- Poi fai click su "Attivata"
- Poi clicca su "Mostra" ed inserisci i tre ID copiati sopra e dai l'ok.
- Applica e dai ok

- Adesso Windows non potrà più aggiornare questo driver

Se Windows Update cerca di installare in continuazione (fallendo) questo driver potete seguire questa guida:

- Per nascondere l'aggiornamento del driver in windows Update che fallirà ogni volta l'installazione scarica il tool wushowhide.diagcab

- avvia il tool
- clicca su Apply repairs automatically
- Next
- Hide updates
- seleziona Synaptics dalla lista e clicca su Next
- Close

This article is property of PC Wizard wroted by Michele (Italy). Please don't copy and paste without mentioning the blog and the author.
or use the QR code:
QR code 

 

martedì 8 febbraio 2022

Remap keyboard keys on Windows 10/11

Testing the MSI Prestige 15 I figured out that the keyboard is very uncomfortable compared to my previous one. The key that I miss the most is WIN MENU (usually between ALT GR and CTRL) that I use to open the Windows context menu working on system folders. Without this key I had to leave the keyboard and to use the touchpad to give a right click, and for me this is really annoying.


This keyboard has two CTRL so I decided to renounce to one of them (the right one) and to remap it with the WIN MENU. Online you can find some softwares that will perform the remapping of the keys in a much more intuitive way than the one we will see in this tutorial. If you, like me, are not a fan of third-party software and you prefer to make the changes by your own even if in a more spartan way as in the case we will examine, then follow this tutorial.

These are the steps to follow:

1. Open regedit and insert a new "binary key" renaming it "Scancode Map" in this path:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

(be careful not to confuse it with "Keyboard Layouts" otherwise the entered key will not work if you will insert it into the folder "Keyboard Layouts" instead of "Keyboard Layout")

2. Insert these values into the binary key created:

first row 00 00 00 00 00 00 00 00
second row 02 00 00 00 5D E0 1D E0
third row 00 00 00 00


"5D E0" represent the "WIN MENU" and "1D E0" represent the "Right CTRL". We will call Scancode Set the identifiers of the buttons (like the "5D E0").


If you wanna edit only one button you can stop here.
If you wanna edit another button replace the third row with the following (in my case I will change the "INS" button with the "END" button):

third row 02 00 00 00 4F E0 52 E0
fourth row 00 00 00 00
You can follow this tutorial to replace these two button keys with the buttons that you need referring to the jpg file "remap key table windows" attached below. As a clarification when you find the E0 parameter insert it after the Scancode Set and remember that these changes work within the operating system in which you have added the registry key (any other systems in dual boot or distro linux installed or already present in your machine will not be affected by these remaps).


The sources that helped me realizing this tutorial:

Keyboard key kills and remaps
Remap Keyboard Keys - No Third Party Software (Tutorial)
Youtube tutorial: Tech Tuesday - How To Remap Keys [No Third Party Software]

This article is property of PC Wizard wroted by Michele (Italy). Please don't copy and paste without mentioning the blog and the author.

or use the QR code:
QR code 

 

Come rimappare i pulsanti della tastiera su Windows 10/11

Testando il nuovo MSI Prestige 15 mi sono ritrovato con una tastiera molto scomoda rispetto alla mia tastiera precedente. Il pulsante che mi manca molto è il WIN MENU (quello posto spesso tra i pulsanti ALT GR e CTRL) che utilizzo per aprire il menù contestuale di Windows quando eseguo operazioni tra le cartelle. In sua mancanza sono costretto a passare dalla tastiera al touchpad per premere il tasto destro del mouse.


Avendo questa tastiera due tasti CTRL ho deciso di rinunciare a quello posto sulla destra e rimapparlo con la funzione del WIN MENU. In rete potete trovare dei software che in maniera molto più intuitiva rispetto a quella che vedremo in questa guida eseguiranno la rimappatura dei tasti. Se anche voi come me non siete amanti dei software di terze parti e preferite eseguire le modifiche manualmente anche se in maniera più spartana come per il caso che prenderemo in esame allora seguite questa guida.

Riporto nel seguito la procedura da seguire:

1. Aprire regedit e inserire una nuova "chiave binaria" dandole nome "Scancode Map" nel percorso:

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout

(attenzione a non confonderla con "Keyboard Layouts" altrimenti la chiave inserita non funzionerà se inserita nella cartella "Keyboard Layouts" invece che "Keyboard Layout")

2. Inserire i seguenti valori all'interno della chiave binaria creata:

prima riga 00 00 00 00 00 00 00 00
seconda riga 02 00 00 00 5D E0 1D E0
terza riga 00 00 00 00


"5D E0" rappresenta il "WIN MENU" e "1D E0" rappresenta il "CTRL destro". Chiameremo i parametri che indicano i pulsanti (ad esempio "5D E0") Scancode Set nel proseguio.


Potete fermarvi qui se volete modificare un solo pulsante.
Se volete modificarne altri sostituite la terza riga con questa (nel mio caso sostituisco "INS" con "FINE"):

terza riga 02 00 00 00 4F E0 52 E0
quarta riga 00 00 00 00
Potete seguire questa guida e sostituire questi due pulsanti con quelli che volete consultando il file jpg "remap key table windows" allegato. Come precisazione quando troverete il parametro E0 inseritelo sempre dopo lo Scancode Set e ricordate che queste modifiche funzionano all'interno del sistema operativo nel quale avete aggiunto la chiave di registro (eventuali sistemi in dual boot o distro linux installate o già presenti nella vostra macchina non saranno influenzate da queste rimappature).


Guide seguite a supporto:

Keyboard key kills and remaps
Remap Keyboard Keys - No Third Party Software (Tutorial)
Youtube tutorial: Tech Tuesday - How To Remap Keys [No Third Party Software]

This article is property of PC Wizard wroted by Michele (Italy). Please don't copy and paste without mentioning the blog and the author.

or use the QR code:
QR code 

 

Xbox App reappearing on every reboot on Windows 10/11

In these days I trying an MSI Prestige 15 and I'm writing this tutorial because I noticed a small little problem that make me mad and I want to share it. I unpinned  several times the XBOX app from the Taskbar but every time I restart my laptop I find the shortcut again there. So with the steps that you will find below you can resolve this stupid little problem and remove definitely the app from the Windows 10/11 Taskbar.

Follow this steps:

1. open run and past this URL:

%userprofile%\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml
2. open with the notepad the file LayoutModification.xml and delete that string:

 <taskbar:UWA AppUserModelID="Microsoft.GamingApp_8wekyb3d8bbwe!Microsoft.Xbox.App" />

3. Save the edited file on the Desktop and replace the old one contained at the folder of the step 1. Before these make a backup of the old file to restore it if you will mess something in the editing of the file.

4. Remove the app from the taskbar for the last time and reboot you pc to check that the app will not show itself again on every reboot of Windows.

With this tutorial you can delete every other icon that reappears (after reboot) even if you already deleted it. To do it simply remove everything between <defaultlayout:TaskbarLayout> and </defaultlayout:TaskbarLayout>. You will find a string (to delete) that looks like this <taskbar:TaskbarPinList> through </taskbar:TaskbarPinList>


 

The source that I used to solve my problem were these:

randomly learned 

Xbox app will not stay off of Taskbar

This article is property of PC Wizard wroted by Michele (Italy). Please don't copy and paste without mentioning the blog and the author.

If you wanna help me donate here: https://www.paypal.com/donate?business=AUDLXGNQV6FAA&no_recurring=0&item_name=sostegno+del+blog+PC+Wizard&currency_code=EUR 

ore use the QR code:


Rimuovere l'applicazione XBOX che riappare sulla Taskbar di Windows 10/11 ad ogni riavvio

In questi giorni sto utilizzando un MSI Prestige 15 e scrivo questa guida per fornire una procedura che possa rimuovere in via definitiva il collegamento all'applicazione XBOX che riappare sulla Taskbar di Windows 10/11 ad ogni riavvio del PC anche se viene continuamente rimossa.

Per rimuovere definitivamente l'icona dalla taskbar i passaggi da eseguire sono questi:

1. aprire esegui ed incollare il seguente URL:

%userprofile%\AppData\Local\Microsoft\Windows\Shell\LayoutModification.xml
2. aprire il file LayoutModification.xml con il blocco note ed eliminare la seguente stringa:

 <taskbar:UWA AppUserModelID="Microsoft.GamingApp_8wekyb3d8bbwe!Microsoft.Xbox.App" />

3. Salvare il file sul Desktop e sostituire il vecchio file contenuto nella cartella aperta al punto 1. Per sicurezza fate un backup del vecchio file da ripristinare in caso qualcosa vada storto.

4. Rimuovere l'applicazione dalla taskbar per l'ultima volta e riavviare per controllare che il processo sia andato a buon fine e l'applicazione non ricompaia nuovamente all'avvio di Windows.

Con questa procedura è possibile rimuovere anche tutte le altre icone che ricompaiono automaticamente cancellando tutto ciò che trovate tra <defaultlayout:TaskbarLayout> e </defaultlayout:TaskbarLayout>. Troverete una stringa (da cancellare) simile a <taskbar:TaskbarPinList> che si conclude con </taskbar:TaskbarPinList>


 

Le fonti che mi sono state utili per eseguire la porcedura sopra menzionata sono queste:

randomly learned 

Xbox app will not stay off of Taskbar

This article is property of PC Wizard wroted by Michele (Italy). Please don't copy and paste without mentioning the blog and the author.

If you wanna help me donate here: https://www.paypal.com/donate?business=AUDLXGNQV6FAA&no_recurring=0&item_name=sostegno+del+blog+PC+Wizard&currency_code=EUR 

ore use the QR code:


giovedì 13 gennaio 2022

Execute python code directly from a raw link on Github

Like you have seen in the previous posts, in these days I'm working on a python script that can automatically download and calculate the numbers of the covid in Italy. 

I loaded this code to trinket so that anyone can try it in one click, but, I'm testing it and every time I made a fix I have to paste my code to a new trinket link and I have to upload it back to my blog.

To skip this step I thinked about to execute the code directly from the raw link of the script from my Github page.

I tryed severals code but the one that worked in my case was this:

# read the data from the URL and print it
import urllib.request
# open a connection to a URL using urllib
webUrl  = urllib.request.urlopen('https://raw.githubusercontent.com/Pymai73/bollettino_covid_giornaliero/main/bollettino_covid.py')

#get the result code and print it
#print ("result code: " + str(webUrl.getcode()))

# read the data from the URL and print it
data = webUrl.read()
exec(data)

You can edit the "exec" with a "print" if you don't want to run the code but you wanna only grab it. Make sure that the source of the code is reliable or preferable writed by you like in my case and remember always that you are executing code from an external source that can be changed from someone so be careful and do it also if your source is really reliable. I found the code above at guru99 website and like you can see I disabled with the # the code that get the confirm that the page have been founded and print it. If you need this confirm you can delete the # and reactivate the print ("result code: " + str(webUrl.getcode()))

If you wanna see the result you can take a look to the trinket frame here. The next time I will upload my code in my github Github page (Pymai73) the trinket frame will execute directly the new code without any manual update.

An alternative way with the urllib.request I founded at stackoverflow to retrieve all the code in a raw file uploaded online was this one:

# read the data from the URL and print it
#
import urllib.request

url = "https://raw.githubusercontent.com/Pymai73/bollettino_covid_giornaliero/main/bollettino_covid.py"
file = urllib.request.urlopen(url)

for line in file:
    decoded_line = line.decode("utf-8")
    print(decoded_line)

In this case the code will be printed to screen line by line but I haven't find a way to execute It directly because of some errors. I have to analize better the traceback. If someone have some idea how to edit this second code to execute it directly like the first one I will appreciate if you let me know in the comment section below.

This article is property of PC Wizard wroted by Michele (Italy). Please don't copy and paste without mentioning the blog and the author.

If you wanna help me donate here: https://www.paypal.com/donate?business=AUDLXGNQV6FAA&no_recurring=0&item_name=sostegno+del+blog+PC+Wizard&currency_code=EUR 

ore use the QR code: