Giter Site home page Giter Site logo

scripts's People

Contributors

mattiasc85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scripts's Issues

(502) Bad Gateway on Download-AppxFromStore.ps1

I am receiving a "(502) Bad Gateway" error only when the script tries to download the .blockmap file of a free store app (in this case, Microsoft Camera). It is able to download the other .appx and .appxbundle files without issue.
Download-AppxFromStoreError

Download-AppxFromStore.ps1: Deployment script?

In the script is this quote

There's this "small" issue with deploying .Appx and AppxBundles during an OSD.
But that script will be done and uploaded in a cuple of days or so. :)

However I don't see this script in the OSD folder, have you still got a copy of the install script?

Download-AppxFromStore Stops at 403 HTTP error

I can open the store.rg-adguard.net website and use it in a browser just fine, but this script (which has worked like a champ for years) now just gives me a "(403) Forbidden" error (see below).

I have only a rudimentary understanding of Powershell, but I tried adding a referer URI to the headers using $wchttp.Headers[[System.Net.HttpRequestHeader]::Referer]="https://store.rg-adguard.net/" and (separately) $wchttp.Headers.Add("Origin", "https://store.rg-adguard.net/") but that made no difference. ๐Ÿ˜•

I know that this may not be fixable from this side of the equation since the error is generated server-side, but I am hoping that other people far smarter than I am will figure out how to get around this.

Thanks!

Exception calling "UploadString" with "2" argument(s): "The remote server returned an error: (403) Forbidden."
At C:\Users\[REDACTED]\Desktop\Download-AppxFromStore.ps1:60 char:1
+ $HtmlResult = $wchttp.UploadString($URI, $myParameters)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Download-AppxFromStore.ps1: Downloads every version of an app?

There is a problem with the logic behind Download-AppxFromStore.ps1, it's not just downloading the latest version of the appx + all the dependencies, it's actually downloading all the old versions of the app itself too!

image

In this example app it ended up downloading 2.9GB of old versions that I had to delete, waste of time and bandwidth.

Package download fails if %tmp% starts with a lowercase letter

If %tmp% starts with a lower-case letter then this script fails:

https://github.com/MattiasC85/Scripts/blob/master/OSD/Download-AppxFromStore.ps1

This is most easily demonstrated using the -SavePathRoot parameter:

Download-AppxFromStore.ps1 -StoreURL https://www.microsoft.com/en-us/p/windbg-preview/9pgjgd53tn86 -SavePathRoot c:\src\temp
Invalid characters in path c:\src\temp\9pgjgd53tn86

Download-AppxFromStore.ps1 -StoreURL https://www.microsoft.com/en-us/p/windbg-preview/9pgjgd53tn86 -SavePathRoot C:\src\temp
Downloading Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe.BlockMap...
Downloading Microsoft.WinDbg_1.2001.2001.0_neutral__8wekyb3d8bbwe.appx...


Download is complete...
Opening Folder

I'd submit a PR but I can't decode the regex or its intent.

Install switch

Please add the following:

  1. An -Install switch that will install the d/l'ed app instead of opening the directory it was d/l'ed to.
  2. A switch to delete the d/l'ed files if the installation succeeded.
  3. The ability to supply a list (array) of URLs to d/l and install.

Download-AppxFromStore.ps1 textContent is always empty

Tried to use it to download WinDbg
https://apps.microsoft.com/store/detail/windbg-preview/9PGJGD53TN86
It doesn't download anything because textContent which is supposed to be file name (I think?) is empty.
Windows 11 pro 64 bit
Output of the script (modified a litle to print $Download instead of $Download.textContent)

PS E:\Downloads> powershell -ExecutionPolicy ByPass -File Download-AppxFromStore.ps1 https://apps.microsoft.com/store/detail/windbg-preview/9PGJGD53TN86
Downloading @{textContent=; href=http://dl.delivery.mp.microsoft.com/filestreamingservice/files/d37438d0-56af-4b7a-b437-b000b6195d8a}...
Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."
At E:\Downloads\Download-AppxFromStore.ps1:122 char:67
+ ... ($Download.href, "$SavePathRoot\$ProductID\$($Download.textContent)")
+                                                  ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Downloading @{textContent=; href=http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/4c032be9-8e5e-490e-9d84-3eb4392501ad?P1=1676177949&P2=404&P3=2&P4=EtCOJHGi2fAWM56%2flPJlqNfz6Fpg9QViwOeJQK2DSyZxf6%2bh6PNzkxzmoudmMuYkiQrHJwi%2bJcED0dCBTit9eA%3d%3d}...
Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."
At E:\Downloads\Download-AppxFromStore.ps1:122 char:67
+ ... ($Download.href, "$SavePathRoot\$ProductID\$($Download.textContent)")
+                                                  ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Downloading @{textContent=; href=http://dl.delivery.mp.microsoft.com/filestreamingservice/files/408eeab8-5c65-4246-8f8b-c541e86b88fe}...
Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."
At E:\Downloads\Download-AppxFromStore.ps1:122 char:67
+ ... ($Download.href, "$SavePathRoot\$ProductID\$($Download.textContent)")
+                                                  ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Downloading @{textContent=; href=http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/978feae8-9dfb-448a-af1a-f85fa96fd5ab?P1=1676178449&P2=404&P3=2&P4=TiQu6veH5nVRDNnSwepT%2bbQ9BaGtoa7azsrNTOZ%2fh%2b0NffZXUbXdAVhTqKvSC%2fkx3gTgJv7LFXAzVXOPckcsDw%3d%3d}...
Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."
At E:\Downloads\Download-AppxFromStore.ps1:122 char:67
+ ... ($Download.href, "$SavePathRoot\$ProductID\$($Download.textContent)")
+                                                  ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Downloading @{textContent=; href=http://dl.delivery.mp.microsoft.com/filestreamingservice/files/09375dd6-cccd-4f82-9d76-06fd9810ec89}...
Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."
At E:\Downloads\Download-AppxFromStore.ps1:122 char:67
+ ... ($Download.href, "$SavePathRoot\$ProductID\$($Download.textContent)")
+                                                  ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

Downloading @{textContent=; href=http://tlu.dl.delivery.mp.microsoft.com/filestreamingservice/files/3add0143-11b3-48fe-85e8-02f9b58b2850?P1=1676187649&P2=404&P3=2&P4=mCXHXWOcM4Lw9NwWgOQPgVPz6ZHYc7ABwD2MY%2f25RwMVVPtvqe%2bZRqehAZrFgqmpsxCH19RUBAJKP0dh2bxuHQ%3d%3d}...
Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."
At E:\Downloads\Download-AppxFromStore.ps1:122 char:67
+ ... ($Download.href, "$SavePathRoot\$ProductID\$($Download.textContent)")
+                                                  ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : WebException

---------------------------------------

Download is complete...
Opening Folder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.