Programatically download file (script problem)
-
I want my application to programatically download a file from skydrive.live.com, but I encountered a problem: Microsoft uses script for file download that makes it impossible to download the file using WebClient (at least as far as I know). Could somebody help to find a workaround on how to download the file? The microsoft's script is: [Download](javascript:$SelfPage.Download()) var $SelfPage = new function() { var _download = 'http\x3a\x2f\x2f5odcbq.bay.livefilestore.com\x2fy1pi19dAInfgawlhjDTcs2sbdCJEkvL7jzsz8SVx9qA-EiQwX-ZPeg-DCt63IEoNWu7USu9uUA-j9FkUosBKqU-3Q\x2fApskaita_1.1_beta_update.exe'; var _demote = 'http\x3a\x2f\x2f5odcbq.bay.livefilestore.com\x2fy1pi19dAInfgawlhjDTcs2sbdCJEkvL7jzsz8SVx9qA-EiQwX-ZPeg-DCt63IEoNWu7USu9uUA-j9FkUosBKqU-3Q\x2fApskaita_1.1_beta_update.exe'; var _dirty = false; this.MarkDirty = function() { _dirty = true; } this.Download = function() { if (_dirty) { _dirty = false; window.location = _demote; } else { window.location = _download; } } }