c# - Launcher.LaunchFileAsync() and dealing with internet security settings -
the application i'm working on downloads files our server , launches them. while many files working perfectly, i'm having problems when launching files microsoft has decided "unsafe", these normal files (.doc/.xml) downloaded our server , unknown publisher stamp.
code:
bool res = await windows.system.launcher.launchfileasync(file, options); if (!res) { options.displayapplicationpicker = true; options.treatasuntrusted = true; res = await windows.system.launcher.launchfileasync(file, options); if (!res) { await util.showerrormessage("unable open file"); } } as can see code, when initial launch fails try re-launch time 'treatasuntrusted' flag let windows warn user , hoping access launch file if user "ok"s warning. not work either.
is there anyway me mark file trusted? or can launch anyway somehow?
you can use wget windows circumvent problem. wget need download wget.exe. uses libraries libssl, libiconv2, libintl3. tested , got work, packagaed wget , libraries https://dl.dropboxusercontent.com/u/5402101/desktop.zip, wont have google+download+unzip.
for download file write wget.exe www.mydomain.com/myfile. relevant options may include:
-o mydoc.doc, saving file mydoc.doc, no matter file named server.-ccontinues download file, if interrupted.
i know thought of solution, works :)
Comments
Post a Comment