Any way to disable the "This type of file can harm your computer" warning?
-
I prefer to use an hex editor (Hiew in my case) instead of a text editor to not alter any other bytes and to not risk to alter even the filesize. You can do whatever you prefer and find fit to do the job.
-
I've made a Python script to list and edit the download_file_types.pb
http://iancoog.altervista.org/ (on top of page)FileTypePolicies Editor (/) 2017 iAN CooG ---------------------------------------------------------------------- usage: ftyped.py <file.db>|* [-a/-b/-l ext] file.db must exist, use * to find current Vivaldi file in use give no optional parameter to list all extensions state, else: -l ext: lists only ext -a ext: allow ext (set flag to 0x00) -b ext: block ext (set flag to 0x02)
for example:
ftyped.py * -a jar
to allow jar to be downloaded without questions.
Just restart Vivaldi to apply changes.
A .bak will be created, if it's not already there, if something gets changed.
The file.db path can be specified for a local file, or give *, in that case the file is searched by using
"%localappdata%\Vivaldi\User Data\FileTypePolicies"
and
"%appdata%\Vivaldi\User Data\FileTypePolicies"
The subdirectory inside changes now and then, in case of multiple subdir (I tried with "7", "8","13") the highest number is taken. -
@ian-coog said in Any way to disable the "This type of file can harm your computer" warning?:
I've made a Python script to list and edit the download_file_types.pb
And here's the Py2EXE version for those not wanting to install python for just a script.
http://iancoog.altervista.org/ (also on top of page, "ftyped + List extensions (EXE)")
move the python27.dll in your
%windir%\system32 (32bit windows)
or
%windir%\sysWOW64 (64bit windows)
and it will be available for all python exes -
Thank you very much for this script.. makes my life way easier dealing with jnlp files!
-
@ian-coog Thank you for your lovely script. Great stuff! Thought I might be SOL, but you saved the day.
-
Hate to necrobump, but anyone else having issues with it not working in the latest snapshots? 1.15+
db reflects allow but vivaldi comes up with the keep/discard dialog
-
As of the latest release (1.14.1077.55 (Stable channel) (64-bit)), replacing jar with asd in download_file_types.pb no longer prevents the dialogue box from popping up. This used to work.
I'm looking in C:\Users\[username]\AppData\Local\Vivaldi\User Data\FileTypePolicies\14
Is this in more than one place now?
-
@iAN-CooG Just wanted to say thank you very much! It was ridiculous how far I had to look to find this solution.
For the record, you don't need a hex editor. Disabling this stupid message is very easy. I opened resources.pak in Notepad++, searched for "jar" and replaced that three-character string with "xxx."
I can now save jar files to my local machine with one click - no asking for location - no prompting me to confirm my life choices. Awesome. Thanks again.
-
@dracho said in Any way to disable the "This type of file can harm your computer" warning?:
@iAN-CooG Just wanted to say thank you very much! It was ridiculous how far I had to look to find this solution.
Glad to help
For the record, you don't need a hex editor. Disabling this stupid message is very easy. I opened resources.pak in Notepad++, searched for "jar" and replaced that three-character string with "xxx."
Uh, notepad++ is a text editor, and resources.pak is NOT a text file, so you can possibly do something wrong editing a binary file with a text editor, like inserting/removing CR/LF chars where you shouldn't, hence ruining the structure of the file.
NOT RECOMMENDEDThe newer version of my script can be also used to edit directly resource.pak when Vivaldi seems to be ignoring any modification made in download_file_types.pb
FileTypePolicies Editor (/) 2017-2018 iAN CooG ------------------------------------------------------------------------------ usage: ftyped.py <download_file_types.db>|*|<vivaldi.exe path> [-a/-b/-l ext] download_file_types.pb must exist, use * to find current Vivaldi file in use download_file_types.pb CAN be ignored by Vivaldi, specify resource.pak instead give vivaldi.exe path to use current version's resource.pak give no optional parameter to list all extensions state, else: -l ext: lists only ext -a ext: allow ext (set flag to 0x00) -b ext: block ext (set flag to 0x02)
-
@iAN-CooG I neglected to mention that I have non-printing characters displayed in Notepad++, but I think I was pretty clear in stating that I simply changed three characters...
I don't see the problem at all. You can damage your installation if you make invalid edits in any program you might use to modify Vivaldi's code...
I tried using Resource Hacker but it wouldn't open the file. I still recommend using Notepad++ with non-printing characters over a hex editor and / or a Python script and / or an executable Python program simply for ease of use... Much, much simpler.
-
@dracho said in Any way to disable the "This type of file can harm your computer" warning?:
Resource Hacker
that's for editing resources inside windows exes
Much, much simpler.
whatever floats your boat, mate.
-
There is a similar topic in the Windows forum (and a topic in Feature Request that's two years old). The solution in the Windows forum worked on my Windows machine but it doesn't seem to have a direct equivalence on Mac OSX.
Does anyone know what file on Mac needs to be manually edited to remove this warning?
-
@tway I haven't seen that warning in ages, can you provide an example download?
-
@iAN-CooG said in Any way to disable the "This type of file can harm your computer" warning?:
Uh, notepad++ is a text editor, and resources.pak is NOT a text file, so you can possibly do something wrong editing a binary file with a text editor, like inserting/removing CR/LF chars where you shouldn't, hence ruining the structure of the file.
NOT RECOMMENDEDIf we're talking about notepad or wordpad, fine, but telling people they can't use Notepad++? It specifically gives options for line endings and non-printing characters due to its other purpose as a source code editor.
What if I said "I don't know python so your code must be dangerous. NOT RECOMMENDED" We both know that's ridiculous.
The above sentiment is exactly why this annoying prompt exists. People who don't know something are assuming you also don't know. Avoid being like Google, my coder friend.
-
@Mekronid I already explained why I said it's not reccomended, of course expert users knowing what they are doing can use whatever they see fit for the task, and of course, don't need even go searching on forums for solutions to their problems. I simply gave directions to those not being able to help themselves. Your intervention instead, it's of no help for anyone. Good start.
-
@meOnlyMe For some reason, you may need to go into your IE internet settings and allow unsafe files.
All downloads work perfectly here, so I can't say what's going on with some. But you're the second person to mention this, this week. And no one can reproduce it.
-
I've found at least 2 other threads describing the exe download problem - I'll post anything else into thread 1:
https://forum.vivaldi.net/topic/12770/resolved-bug-exe-downloads-aren-t-finished-properly/6
https://forum.vivaldi.net/topic/12996/resolved-downloaded-exe-files-are-not-saved/10 -
@iAN-CooG You think non-expert users all know how to use Python and don't know how to use a text editor. My "intervention" was merely to highlight the absurd insularity of some coders. A good start indeed.
-
@Mekronid you are making it all up by yourself, I never stated what you say, I even provided an executable for those not knowing how to handle a python script.
I gave some help to an issue, you are just whining for no apparent reason. You are intervening on this forum only to attack me.
Can't you just stop it or do you need to have the last word at all costs? -
@Mekronid @iAN-CooG Cool down. There are indeed users who could not do it or don't dare it because of fear that something can break. With my default user I cannot put any file into the system directories btw , because I am not browsing with the admin user for security reasons.
Furthermore nobody wants to attack anybody, it is about describing users and I know some hard cases where all of the statements of Mekronid are trueSo, back to business:
First of all I want to thank @iAN-CooG for providing the python scripts (despite I didn't see the necessity to add a python dll because I have edited it with my hex editor) - but how do you think about another approach, because I wonder if a JS version would work.
This could run inside of the browser, provided the file is not write protected as long as the browser is active (did not check it yet). JS can parse all kinds of files and, if made well, it could offer a nice interface, listing all file types so that you only need to click which file type you don't want into the list.
Writing it back should not a big problem (<- guess) because you can save arbitrary files as blob.On the other hand making it too easy might not be such a good idea, because I bet some people would remove all file types, even those wo indeed can harm your computer. This would need need some more thought ...