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

Unpin-default-apps #115

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions scripts/Unpin-default-apps
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#Source taken from http://community.cognetic.com/index.php?topic=53.0
#Original poster: bflores
#This script does not require to be run as administrator

function Pin-App { param(
[string]$appname,
[switch]$unpin
)
try{
if ($unpin.IsPresent){
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'From "Start" UnPin|Unpin from Start|Atsegti nuo pradžios ekrano|Atsegti nuo užduočių juostos'} | %{$_.DoIt()}
return "App '$appname' unpinned from Start"
}else{
((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'To "Start" Pin|Pin to Start|Prisegti pradžios ekrane|Prisegti prie pradžios erano'} | %{$_.DoIt()}
return "App '$appname' pinned to Start"
}
}catch{
Write-Error "Error Pinning/Unpinning App! (App-Name correct?)"
}
}


#Haven't been fully tested with Ads:
#Drawboard PDF,
#Asphalt 8: Airborne
#Fallout Shelter
#For now it seems to NOT WORK with them, I'm not the author of the script, so it might need some modifications of advanced powershell programmer.

#How to manually update script to your own Windows language:
#1.Copy and paste this path: shell:::{4234d49b-0245-4df3-b780-3893943456e1} into File Explorer:
#2.From the opened folder: copy and paste names of the shortcuts into the list of this script below.
#3.Now right click on any shortcut stored in shell:::{4234d49b-0245-4df3-b780-3893943456e1}
#4.And manually write down context menu option name of "Unpin from Start" that is presented in your own/current windows language.
#5.Search in this script for "-match 'From "Start" UnPin|Unpin from Start|" and add context name to the list.
#6.Example:
#... -match 'From "Start" UnPin|Unpin from Start|Your language unpin option name|Atsegti nuo pradžios ekrano|Atsegti nuo užduočių juostos'} | %{$_.DoIt()}


#Lithuanian language

Pin-App "Parduotuvė" -unpin
Pin-App "Nuotraukos" -unpin
Pin-App "Skaičiuotuvas" -unpin
#... To be continued... SOMEBODY once told me the world is gonna roll me

#English language

Pin-App "Mail" -unpin
Pin-App "Store" -unpin
Pin-App "Calendar" -unpin
Pin-App "Microsoft Edge" -unpin
in-App "Photos" -unpin
Pin-App "Cortana" -unpin
Pin-App "Weather" -unpin
Pin-App "Phone Companion" -unpin
Pin-App "Music" -unpin
Pin-App "xbox" -unpin
Pin-App "movies & tv" -unpin
Pin-App "microsoft solitaire collection" -unpin
Pin-App "money" -unpin
Pin-App "get office" -unpin
Pin-App "onenote" -unpin
Pin-App "news" -unpin