- Poll: How reliable are ChatGPT and Bing Chat? - Tue, May 23 2023
- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
In my last post, I explained how to remove the Store icon from the Taskbar with a Group Policy and how to disable the Windows Store in your network. A problem with the latter solution is that, when end users click the Store icon on the Start Screen, they will see an error message that recommends stealing your precious time. I am guessing that this is not what you want.
Of course, the first solution that comes to mind is to simply uninstall the Windows Store app. However, if you remove all Modern apps after you deployed Windows or before you deployed your OS image, the Store icon will stubbornly stay on the Start Screen.
However, a workaround exists that allows you to remove the Store app icon from the Start Screen. To be honest, I don’t understand why the Group Policy that disables the Windows Store app doesn’t also remove the corresponding icon. The only way to get rid of the Windows Store appears to be to delete the Store shortcut from C:\ProgramData\Microsoft\Windows\Start Menu\Programs. (If you still need proof that Windows 8.1 still has a Start Menu that is just a bit bigger than before, look at the directory path.)
The folder containing the link to the Windows Store icon on the Start Screen
If you delete the Store icon manually, Windows will ask you a couple of times if you are really sure that you want to remove this wonderful icon. Not only do you need administrator rights to delete the link, but UAC will also inform you that you are about to do something dangerous—that is, deprive your users of all the fantastic games in the Windows Store. Thus, if you have UAC enabled in your network (which you should), things can get tricky if you want to remove the Store icon with a logon script.
The easiest way is to delete the Windows Store link file with Group Policy Preferences. You can do this either in Computer Configuration or User Configuration depending on how you organized your Active Directory structure.
Delete Windows Store app icon with Group Policy Preferences
Notice that, in Windows Explorer, the link appears as “Store.” However, the file name of the shortcut is “Windows Store.lnk.” Hence, you have to enter this line in the “Delete file(s)” field in the Group Policy Preferences: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Store.lnk. Make sure that you set “Delete” as the action. If you want to, you can also select the “Suppress error” box.
You can also use a logon script to remove the file if you need more intelligence in your procedure. For instance, if you have to check whether the user has already installed Modern apps before you deprive him or her of the Store app, you’ll need a logon script.
However, you will then face two problems. One is that the logon script will usually run before the desktop (Explorer) is available, and you don’t have access to the user’s Start Menu folder at this time. This problem can be solved if you don’t work with the logon script under “Windows Settings” but rather with the Group Policy “Run these programs at user logon” under Administrative Templates > System > Logon. The second problem of this option is that UAC will get in your way; this usually means that you have to store an administrator password in clear text in your script. Therefore, I don’t recommend this option.
However, you can work with scheduled tasks. This option makes senses if you have other commands in your logon script that need administrator rights. You can find Scheduled Tasks in Computer and User Group Policy Preferences under Control Panel Settings. Make sure that you enter a user account that has administrator rights on your client computers and that you select “Run whether user is logged on or not.”
Create scheduled tasks
On the Triggers tab, specify to being the task “At log on.”
On the Actions tab, select “Start a program” as the action and enter the network share of your logon script.
In your PowerShell logon script, you could include the following line to remove the Windows Store from the user’s Start Screen:
Remove-Item -force "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Windows Store.lnk"
Note that, with this method, you don’t have to store an administrator password in clear text on your server; Windows will store the encrypted password in the GPO. This is much safer, but it is still a security risk. Thus, if you only want to remove the Store icon, I would go for the Files option in Group Policy Preferences.
So far, we have disabled the Windows Store and removed the icon from the Start Screen. If you deployed Windows 8.1 Update before disabling the Store, however, you probably still have the Store icon pinned to the Taskbar. If you don’t want to disable the pinning of apps to the Taskbar altogether, read my next post. I will show you how to remove just the Windows Store symbol from the Taskbar with a PowerShell script.