fredag 17. juni 2016

Unpin Edge (and pin Internet Explorer) with pure PowerShell


The tl;dr
Here are the scripts, use at your own risk:

The first two scripts have some hopefully sensible comments, but I couldn't be bothered adding comments to the last one.

Update 2017-05-01
Added a link to the newer version of the script, which has been confirmed to work under Windows 10 version 1703 (Creators Update).

Update 2016-08-27
The script has been updated with the byte array for Edge on Windows 10 version 1607 (or Anniversary Update). Please note that the byte array was dumped on OS build 14393.82, since this was the newest available at the time. I had one computer that was running an older build of 1607, and I noticed that the byte array was different even if the Edge version number was the same as on the computers with build 14393.82.

If the script does not work for you it is probably because the Edge byte array on your particular flavor of Windows is different from the ones I have included in the script. To get around this you need to:

  1. Get the byte array for the app you want to remove
  2. Find the indexes of the "random" bytes in the array
  3. Add these two pieces of information to the UnpinApps.ps1 script
Get the byte array
This must be done once on two different computers (VM or physical doesn't matter). The computers need to be running the exact same edition of Windows and have the exact same updates installed. Copy the GetAppByteArray.ps1 script to each of the computers, unpin (yes, unpin) the app you're targeting from the taskbar, run the
GetAppByteArray.ps1 script, pin the app and finally click the script window and press a random button to unpause it. This will dump the byte array as a comma-separated list of decimals to a file called appByteArray.txt.

Do a quick visual comparison of the two byte arrays. If any of the first few bytes differ, you probably didn't get the arrays from similar enough computers.

Find the indexes of the "random" bytes in the array

Open CompareArrays.ps1 and paste in the two byte arrays so they end up in $array1 and $array2. Run the script and it will print out the index numbers of elements that differ between the two arrays. These are bytes that seem to be unique for every computer (or Windows installation at least), and must be skipped when the UnpinApps.ps1 script is looking for an app.

Add these two pieces of information to the UnpinApps.ps1 script
Open the UnpinApps.ps1 and create a new entry in the $apps array. Just copy one of the existing entries and clear out the values. One of the byte arrays that you got in the first step goes in "appByteArray" and the index numbers you found in the second step go in "bytesThatDontMatter". Save the script and it's ready for use.

Update 2016-08-05
As of Windows 10 version 1607, which was released to the general public a few days ago, Microsoft has added an officially supported method for pinning and unpinning apps (although you can still not unpin apps that users have pinned manually, only those that are pinned by default).

You can read more about this addition here: https://technet.microsoft.com/en-us/itpro/windows/manage/configure-windows-10-taskbar

Thanks to Robert Grohman for pointing this out in the comments!

Now that pinning and unpinning can be done through officially supported means, the scripts in this post are pretty much rendered unnecessary. I guess the exception would be for those who are stuck on older versions of Windows for the foreseeable future, and maybe if you want to force-remove specific user-pinned apps.


The why and how
We recently started rolling out Windows 10 at work, and one of the pain points that we’ve run into is Microsoft Edge. Not that there is anything wrong with Edge, it seems like a pretty alright web browser, but, well, it’s not Internet Explorer and it does not support addons/plugins. It’s also the default browser in a vanilla Windows 10 installation and it’s pinned to the taskbar. To top things off, the Edge icon is very similar to IE’s icon. If you’re reading this post I guess you already know why these things are problematic in an enterprise environment.

So, being the “group policy guy” in the IT department, I set out to find a way to unpin Edge. At this point I’d never had to deal with unpinning modern/universal Windows apps before, but it seemed like a pretty basic task. How hard could it possibly be?

Pretty hard it turned out, at least if you want to avoid messing up user-pinned apps and applications (which we do). Microsoft simply does not offer a straightforward way to unpin a single app with scripts or group policy. In earlier versions of Windows you could apparently get around this by programmatically “right-clicking” the program’s EXE and invoking one of the available actions from the pop-up menu, but as of Windows 10 that functionality has been removed by Microsoft.

Even if that functionality had still been there it wouldn’t have helped us any with the Edge issue, because with modern apps you can’t just right-click their EXE and pin them to the taskbar. There’s some more magic happening under the hood. At least that is the case with Edge.

Anyway, Windows stores the list of pinned apps and desktop applications in the registry key HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Taskband\Favorites. Regular desktop applications additionally have a shortcut added to %AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar, but since Edge is an app we don’t have to worry about deleting any shortcuts.

The Favorites registry key is of the type REG_BINARY and contains a binary blob representing the list of pinned taskbar items. That makes it a bit tricky to parse. You can view the hex and character representation of the registry key via the Windows Registry Editor, which shows that it contains at least some data that translates into meaningful ASCII characters.

PowerShell’s Get-ItemProperty Cmdlet allows you to dump and manipulate registry keys, by default as an array of bytes. After a bit of experimentation, I found that each pinned app or application adds a specific number of bytes to the taskbar registry key, and that the registry key is terminated by a single all-ones byte, or 255 in decimal.

The position of each app or application’s bytes in the registry key corresponds with the order of the items on the taskbar. Very simplified, you could say that if I have Edge, Firefox and Notepad pinned to the taskbar, in that order, the registry key contains EdgeFirefoxNotepadEND. If I move Firefox all the way to the left, the key changes to FirefoxEdgeNotepadEND, and if I finally unpin edge the key changes to FirefoxNotepadEND. You see where I’m going with this?
I wrote two basic PowerShell scripts. The first is used to find the byte array for a given app, and the second takes one or more of these byte arrays and removes them from the current taskbar registry key. Finally, it restarts explorer.exe to refresh the taskbar.

At this point I was all smiles, until I went to test the script on a different computer, running the exact same version of Windows with same updates installed. The script didn’t work. Much dismayed, I checked the length of the Edge byte arrays from both computers (they matched), and then converted them to their character representations. To the naked eye they looked the same, but there had to be some bytes in there that differed. I used PowerShell to step through the arrays and compare every single byte, writing out the index numbers if two bytes didn’t match.

The bytes at index 1227 through 1232 differed. I had a look at them in character representation, but they were either garbage or blanks. Testing on a third computer turned up the same results, bytes 1227 through 1232 were different from the two other computers. All right then, I guess we should just ignore those bytes when doing the array comparison.

Since we’re using the Current Branch for Business of Windows 10 at my workplace, we were still on build 10.0.10240-something-something at the time I made this script. This was reflected by Edge’s version number, and thus the byte array that needed to be removed. In an attempt to futureproof the script a little I also added two flavors of the Edge byte array from 10.0.10586 builds of Windows. In the end the script successfully removed Edge from all the computers I tested it on at work, as well as the few couple of 10.0.10586 computers that I have at home.

All right, we’re rid of Edge! That wasn’t so bad, was it? Now we just need to pin Internet Explorer. Surely this has to be officially supported by Microsoft? Nope. And as mentioned, the old “right-click”-workaround has been removed by Microsoft. Good grief, it’s like they hold a personal grudge against me.

So back to the drawing board. What I ended up doing was taking my existing PowerShell script to unpin Edge and modifying it a bit to check if IE was pinned, and if not, pin it. The script first checks if IE is pinned by looking for a small subset of the full IE byte array, a subset that I’m pretty sure will stay the same no matter what version of Windows you’re using. If it doesn’t locate that byte array subset, it creates a shortcut in the aforementioned taskbar shortcut directory and adds a known-to-work IE byte array to the taskbar registry key.

We’re currently testing these two scripts at work and everything looks promising so far. The scripts consistently unpin Edge and pin IE, and no one has had their taskbar broken yet. That doesn’t necessarily mean it’s safe for anyone to put these scripts into production, and it could also be that the byte array for Edge in your particular flavor of Windows differs from the ones I have included with the Edge script. In that case you’ll have to dump the Edge array yourself, figure out which bytes always stay the same and update the script accordingly. Don't blame me if the scripts set your dog on fire, though. You've been warned.

There are several different approaches you could take to getting Edge off the taskbar and replacing it with IE, but this was really the only solution I could find that did not involve any third-party software, could be easily deployed through group policy and would preserve any user-pinned apps. Suggestions for improvements and refinements of the scripts are very welcome, please leave a comment below.

19 kommentarer:

  1. Thank you for sharing Rolf!

    SvarSlett
  2. Is there any chance you could update the Unpin Edge script to properly handle Edge build 38.14393.0.0 that ships with win10 v1607?

    SvarSlett
    Svar
    1. Hi Robert,

      Sure thing, I'll try to get it done over the weekend and update the blog post and links.

      Slett
  3. Thank you Rolf. I should no longer need the update that I requested since it seems that we are finally able to do this with built in functionality. https://technet.microsoft.com/en-us/itpro/windows/manage/configure-windows-10-taskbar

    Thanks again for your work here!

    SvarSlett
    Svar
    1. That's great news, I see Microsoft finally came to their senses! Updating the blog post with your link.

      Slett
  4. Denne kommentaren har blitt fjernet av forfatteren.

    SvarSlett
  5. I believe this page is still valuable as the Microsoft "Approved" way of using an XML template is only available to Windows 10 Enterprise and Education users. As far as I can tell it does not work with Windows 10 Pro! Any updates for the latest versions of Edge are greatly appreciated.

    SvarSlett
    Svar
    1. Hi Mike,

      Yes, I will be updating the script for 1607 shortly. In the end we decided not to go with the XML template method since it doesn't allow unpinning user-pinned apps. We want our users to be able to pin applications if they want to, but there are some apps that we absolutely don't want them to pin. Notable examples are Edge and the default Windows 10 e-mail app, since users may confuse these with Internet Explorer and Outlook.

      Slett
  6. Thanks for the article. Here is the latest 1607 build (post 1 of 2):

    @{
    "appName" = "Microsoft Edge 1607 14393.321"
    "appByteArray" = @(0,226,5,0,0,20,0,31,128,155,212,52,66,69,2,243,77,183,128,56,147,148,52,86,225,204,5,0,0,48,5,65,80,80,83,30,5,8,0,3,0,0,0,0,0,0,0,42,2,0,0,49,83,80,83,85,40,76,159,121,159,57,75,168,208,225,212,45,225,213,243,93,0,0,0,17,0,0,0,0,31,0,0,0,38,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,95,0,56,0,119,0,101,0,107,0,121,0,98,0,51,0,100,0,56,0,98,0,98,0,119,0,101,0,0,0,17,0,0,0,14,0,0,0,0,19,0,0,0,1,0,0,0,21,0,0,0,20,0,0,0,0,31,0,0,0,1,0,0,0,0,0,0,0,137,0,0,0,21,0,0,0,0,31,0,0,0,60,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,95,0,51,0,56,0,46,0,49,0,52,0,51,0,57,0,51,0,46,0,48,0,46,0,48,0,95,0,110,0,101,0,117,0,116,0,114,0,97,0,108,0,95,0,95,0,56,0,119,0,101,0,107,0,121,0,98,0,51,0,100,0,56,0,98,0,98,0,119,0,101,0,0,0,121,0,0,0,5,0,0,0,0,31,0,0,0,52,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,95,0,56,0,119,0,101,0,107,0,121,0,98,0,51,0,100,0,56,0,98,0,98,0,119,0,101,0,33,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,0,0,137,0,0,0,15,0,0,0,0,31,0,0,0,60,0,0,0,67,0,58,0,92,0,87,0,105,0,110,0,100,0,111,0,119,0,115,0,92,0,83,0,121,0,115,0,116,0,101,0,109,0,65,0,112,0,112,0,115,0,92,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,95,0,56,0,119,0,101,0,107,0,121,0,98,0,51,0,100,0,56,0,98,0,98,0,119,0,101,0,0,0,0,0,0,0,69,2,0,0,49,83,80,83,77,11,212,134,105,144,60,68,129,154,42,84,9,13,204,236,93,0,0,0,12,0,0,0,0,31,0,0,0,38,0,0,0,65,0,115,0,115,0,101,0,116,0,115,0,47,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,83,0,113,0,117,0,97,0,114,0,101,0,49,0,53,0,48,0,120,0,49,0,53,0,48,0,46,0,112,0,110,0,103,0,0,0,89,0,0,0,2,0,0,0,0,31,0,0,0,36,0,0,0,65,0,115,0,115,0,101,0,116,0,115,0,47,0,77,0,105,0,99,0,114,0

    SvarSlett
  7. Thanks for the article. Here is the latest 1607 build (post 2 of 2):

    ,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,83,0,113,0,117,0,97,0,114,0,101,0,52,0,52,0,120,0,52,0,52,0,46,0,112,0,110,0,103,0,0,0,89,0,0,0,13,0,0,0,0,31,0,0,0,36,0,0,0,65,0,115,0,115,0,101,0,116,0,115,0,47,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,87,0,105,0,100,0,101,0,51,0,49,0,48,0,120,0,49,0,53,0,48,0,46,0,112,0,110,0,103,0,0,0,17,0,0,0,4,0,0,0,0,19,0,0,0,0,120,215,255,93,0,0,0,19,0,0,0,0,31,0,0,0,38,0,0,0,65,0,115,0,115,0,101,0,116,0,115,0,47,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,83,0,113,0,117,0,97,0,114,0,101,0,51,0,49,0,48,0,120,0,51,0,49,0,48,0,46,0,112,0,110,0,103,0,0,0,17,0,0,0,5,0,0,0,0,19,0,0,0,255,255,255,255,17,0,0,0,14,0,0,0,0,19,0,0,0,161,0,0,0,49,0,0,0,11,0,0,0,0,31,0,0,0,15,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,32,0,69,0,100,0,103,0,101,0,0,0,0,0,89,0,0,0,20,0,0,0,0,31,0,0,0,36,0,0,0,65,0,115,0,115,0,101,0,116,0,115,0,47,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,83,0,113,0,117,0,97,0,114,0,101,0,55,0,49,0,120,0,55,0,49,0,46,0,112,0,110,0,103,0,0,0,0,0,0,0,49,0,0,0,49,83,80,83,177,22,109,68,173,141,112,72,167,72,64,46,164,61,120,140,21,0,0,0,100,0,0,0,0,21,0,0,0,47,181,44,143,171,252,209,1,0,0,0,0,77,0,0,0,49,83,80,83,48,241,37,183,239,71,26,16,165,241,2,96,140,158,235,172,49,0,0,0,10,0,0,0,0,31,0,0,0,15,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,32,0,69,0,100,0,103,0,101,0,0,0,0,0,0,0,0,0,45,0,0,0,49,83,80,83,179,119,237,13,20,198,108,69,174,91,40,91,56,215,176,27,17,0,0,0,7,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,0,0,0,30,0,239,190,2,0,85,0,115,0,101,0,114,0,80,0,105,0,110,0,110,0,101,0,100,0,0,0,54,5,116,0,0,0,29,0,239,190,2,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,95,0,56,0,119,0,101,0,107,0,121,0,98,0,51,0,100,0,56,0,98,0,98,0,119,0,101,0,33,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,0,0,54,5,0,0)
    "bytesThatDontMatter" = @(1219,1220,1221,1222,1223,1224);
    }

    SvarSlett
  8. My previous post was for 64 bit Windows. I will also post for 32 bit Windows.

    SvarSlett
    Svar
    1. Thanks a lot Greg, I just noticed that the script no longer removed Edge on our freshly installed W10 machines at work and your x64 byte array above did the trick. I will add both the x64 and x86 arrays you posted to the script and credit you for it.

      By the way, which user interface language are you running on the computers that you got these byte arrays from? Judging from your name I'm guessing it's US or British English, and since the byte arrays worked for me on Norwegian bokmål I'm guessing that UI language might not affect the byte arrays. Would be nice if that were the case.

      Slett
  9. Win 32 1 of 1:

    @{
    "appName" = "Microsoft Edge x32 1607 14393.321"
    "appByteArray" = @(0,230,5,0,0,20,0,31,128,155,212,52,66,69,2,243,77,183,128,56,147,148,52,86,225,208,5,0,0,48,5,65,80,80,83,30,5,8,0,3,0,0,0,0,0,0,0,42,2,0,0,49,83,80,83,85,40,76,159,121,159,57,75,168,208,225,212,45,225,213,243,93,0,0,0,17,0,0,0,0,31,0,0,0,38,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,95,0,56,0,119,0,101,0,107,0,121,0,98,0,51,0,100,0,56,0,98,0,98,0,119,0,101,0,0,0,17,0,0,0,14,0,0,0,0,19,0,0,0,1,0,0,0,21,0,0,0,20,0,0,0,0,31,0,0,0,1,0,0,0,0,0,0,0,137,0,0,0,21,0,0,0,0,31,0,0,0,60,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,95,0,51,0,56,0,46,0,49,0,52,0,51,0,57,0,51,0,46,0,48,0,46,0,48,0,95,0,110,0,101,0,117,0,116,0,114,0,97,0,108,0,95,0,95,0,56,0,119,0,101,0,107,0,121,0,98,0,51,0,100,0,56,0,98,0,98,0,119,0,101,0,0,0,121,0,0,0,5,0,0,0,0,31,0,0,0,52,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,95,0,56,0,119,0,101,0,107,0,121,0,98,0,51,0,100,0,56,0,98,0,98,0,119,0,101,0,33,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,0,0,137,0,0,0,15,0,0,0,0,31,0,0,0,60,0,0,0,67,0,58,0,92,0,87,0,105,0,110,0,100,0,111,0,119,0,115,0,92,0,83,0,121,0,115,0,116,0,101,0,109,0,65,0,112,0,112,0,115,0,92,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,95,0,56,0,119,0,101,0,107,0,121,0,98,0,51,0,100,0,56,0,98,0,98,0,119,0,101,0,0,0,0,0,0,0,69,2,0,0,49,83,80,83,77,11,212,134,105,144,60,68,129,154,42,84,9,13,204,236,93,0,0,0,12,0,0,0,0,31,0,0,0,38,0,0,0,65,0,115,0,115,0,101,0,116,0,115,0,47,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,83,0,113,0,117,0,97,0,114,

    SvarSlett
  10. Win 32 2 of 2:

    0,101,0,49,0,53,0,48,0,120,0,49,0,53,0,48,0,46,0,112,0,110,0,103,0,0,0,89,0,0,0,2,0,0,0,0,31,0,0,0,36,0,0,0,65,0,115,0,115,0,101,0,116,0,115,0,47,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,83,0,113,0,117,0,97,0,114,0,101,0,52,0,52,0,120,0,52,0,52,0,46,0,112,0,110,0,103,0,0,0,89,0,0,0,13,0,0,0,0,31,0,0,0,36,0,0,0,65,0,115,0,115,0,101,0,116,0,115,0,47,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,87,0,105,0,100,0,101,0,51,0,49,0,48,0,120,0,49,0,53,0,48,0,46,0,112,0,110,0,103,0,0,0,17,0,0,0,4,0,0,0,0,19,0,0,0,0,120,215,255,93,0,0,0,19,0,0,0,0,31,0,0,0,38,0,0,0,65,0,115,0,115,0,101,0,116,0,115,0,47,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,83,0,113,0,117,0,97,0,114,0,101,0,51,0,49,0,48,0,120,0,51,0,49,0,48,0,46,0,112,0,110,0,103,0,0,0,17,0,0,0,5,0,0,0,0,19,0,0,0,255,255,255,255,17,0,0,0,14,0,0,0,0,19,0,0,0,161,0,0,0,49,0,0,0,11,0,0,0,0,31,0,0,0,15,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,32,0,69,0,100,0,103,0,101,0,0,0,0,0,89,0,0,0,20,0,0,0,0,31,0,0,0,36,0,0,0,65,0,115,0,115,0,101,0,116,0,115,0,47,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,83,0,113,0,117,0,97,0,114,0,101,0,55,0,49,0,120,0,55,0,49,0,46,0,112,0,110,0,103,0,0,0,0,0,0,0,49,0,0,0,49,83,80,83,177,22,109,68,173,141,112,72,167,72,64,46,164,61,120,140,21,0,0,0,100,0,0,0,0,21,0,0,0,12,163,54,101,114,41,210,1,0,0,0,0,77,0,0,0,49,83,80,83,48,241,37,183,239,71,26,16,165,241,2,96,140,158,235,172,49,0,0,0,10,0,0,0,0,31,0,0,0,15,0,0,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,32,0,69,0,100,0,103,0,101,0,0,0,0,0,0,0,0,0,45,0,0,0,49,83,80,83,179,119,237,13,20,198,108,69,174,91,40,91,56,215,176,27,17,0,0,0,7,0,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,0,0,0,29,0,239,190,2,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,46,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,95,0,56,0,119,0,101,0,107,0,121,0,98,0,51,0,100,0,56,0,98,0,98,0,119,0,101,0,33,0,77,0,105,0,99,0,114,0,111,0,115,0,111,0,102,0,116,0,69,0,100,0,103,0,101,0,0,0,54,5,38,0,0,0,30,0,239,190,2,0,83,0,121,0,115,0,116,0,101,0,109,0,80,0,105,0,110,0,110,0,101,0,100,0,0,0,54,5,0,0)
    "bytesThatDontMatter" = @(1219,1220,1221,1222,1223,1224);
    }

    SvarSlett
  11. One more thanks from me. With a few modifications, these scripts have allowed me to pin several other in-house apps. There is one line that seemed to be an error, although it probably doesn't make much difference for most apps. Near the bottom of the script, the line should read:

    $Shortcut.WorkingDirectory = $app["shortcutWorkingDirectory"]

    SvarSlett
  12. Denne kommentaren har blitt fjernet av forfatteren.

    SvarSlett
  13. I am having troubles running the script to dump an apps bytes to a file. I get back "It seems that no app was pinned. Aborting." even though Edge is pinned closest to the search bar on the taskbar. Any help would be appreciated your scripts are very nice. Thanks

    SvarSlett
  14. Apologies I read the instructions wrong I missed that I have to unpin the program before running the script.

    SvarSlett
  15. The new script seems to not only remove Edge but all pinned Apps (Chrome, Office, etc..). Does anyone have a fixed Version that only removes Edge in 1607?

    SvarSlett