none
eliminating "Do you want to open or save" for zip file RRS feed

  • Question

  • I have a powershell script that will automatically download zip files from a 3rd party
    $username='USERNAME' 
    $password='password'
    
    $ie = New-Object -ComObject 'internetExplorer.Application'
    $ie.Visible= $true
    
    $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/login.asp")
    while ($ie.Busy -eq $true){Start-Sleep -seconds 1;}   
    
    $usernamefield = $ie.Document.getElementByID('UserID')
    
    $usernamefield.value = $username
    
    $passwordfield = $ie.Document.getElementByID('password')
    $passwordfield.value = $password
    
    $Link=$ie.Document.getElementsByTagName("input") | where-object {$_.type -eq "submit"}
    $Link.click()
    
    $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/listing.asp")
    
     Start-Sleep -Second 2
    
    
    if ( (get-date).DayOfWeek -eq 'Monday')
     {
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011SEA1%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011SEA1%2EZIP")
       Start-Sleep -Second 2
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011PEA1%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011PEA1%2EZIP")
     } 
     elseif ( (get-date).DayOfWeek -eq 'Teusday')
     {
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011SEA2%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011SEA2%2EZIP")
      Start-Sleep -Second 2
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011PEA2%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011PEA2%2EZIP")
     }
      elseif ( (get-date).DayOfWeek -eq 'Wednesday')
     {
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011SEA3%3EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011SEA3%2EZIP")
       Start-Sleep -Second 2
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011PEA3%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011PEA3%2EZIP")
     }
      elseif ( (get-date).DayOfWeek -eq 'Thursday')
     {
       $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011SEA4%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011SEA4%2EZIP")
       Start-Sleep -Second 2
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011PEA4%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011PEA4%2EZIP")
     }
      elseif ( (get-date).DayOfWeek -eq 'Friday')
     {
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011SEA5%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011SEA5%2EZIP")
      Start-Sleep -Second 2
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011PEA5%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011PEA5%2EZIP")
     }
      elseif ( (get-date).DayOfWeek -eq 'Saturday')
     {
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011SEA6%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011SEA6%2EZIP")
       Start-Sleep -Second 2
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011PEA6%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011PEA6%2EZIP")
     }
      elseif ( (get-date).DayOfWeek -eq 'Sunday')
     {
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011SEA7%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011SEA7%2EZIP")
       Start-Sleep -Second 2
      $ie.Navigate("https://WWW.WEBSITE.COM/Secure/Authenticated/Download.asp?Name=B011PEA7%2EZIP&File=%5C%5C10%2E217%2E240%2E44%5CEverlink%2DFTS%5CTCUFP%5COutTrans%5CB011PEA7%2EZIP")
     }
    

    this would work fine however the zip files do not download due to this irritating pop up from IE 11 (sunning on windows 2012 server) I tried to add a key as per

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}]
    "WinRAR.ZIP"=hex:

    but I think the SID/GUID is incorrect for WinRAR.zip , any ideas on how I can eliminate that popup/popover
    Wednesday, April 24, 2019 10:39 PM