Display JSON in IE as HTML Without Download - json

I want JSON files and downloads to be displayed directly in the IE browser -- Browse in Place.
There are many posts that describe the technique of setting the CLSID value for application/json in the browser.
For example:
How can I convince IE to simply display application/json rather than offer to download it?
I have tested on IE 11 (11.0.9600.17416) and Windows 10.
I changed the setting and even then rebooted, but I am always prompted to download the JSON.
EDIT:
After running the script to alter regedit, I see the following:

I try to refer the answer in that referenced thread.
I made this test on Windows 10, IE 11 (11.1.18362.0) version.
I simply try to refer the steps below.
(1) Try to open Notepad and paste the code below in it.
Windows Registry Editor Version 5.00
;
; Tell IE to open JSON documents in the browser.
; 25336920-03F9-11cf-8FD0-00AA00686F13 is the CLSID for the "Browse in place" .
;
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/json]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=hex:08,00,00,00
[HKEY_CLASSES_ROOT\MIME\Database\Content Type\text/json]
"CLSID"="{25336920-03F9-11cf-8FD0-00AA00686F13}"
"Encoding"=hex:08,00,00,00
(2) Save the File with name as json-ie.reg
(3) Double click the file to run the script and allow it to create a key.
(4) Try to double click the json file and it opens in IE 11 without any issue.
Output:

Related

How to force Chrome to always open as application without command line or shortcut

How are you?
I hope you are safe and sound.
I was wondering how can edit the Windows 10 in order to make chrome/edge to always open always open as the following flags:--app and -userdatadir=C:/temp
Don't want via shortcut or command line.
Thanks.
From your previous comment, I understand that you want to set the User Data Directory using the registry key for the MS Edge Chromium browser.
Here, I am showing you 2 approaches. Using registry key and using group policy.
Below are the steps to set the User Data Directory using the registry key.
Open Registry editor.
Browse to the location below.
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge
Create a new string value and name it as UserDataDir.
Doubble click on it and set the directory value.
Close the Registry editor and relaunch the MS Edge browser.
Below are the steps to set the User Data Directory using the Group policy.
Open Local group policy editor.
Browse to the location below.
Computer configuration -> Administrative templates -> Microsoft Edge
Find and double click on Set the user data directory policy.
Click on enabled option and then set the desire value.
Close the Local group policy editor and relaunch the MS Edge browser.
Reference:
Create Microsoft Edge user data directory variables

Registry error when using Selenium webdriver with Chrome

The error occurs when running the illustrative example of Selenium-Webdriver with the latest Chromedriver executable. Chrome is correctly launched but there's an error in the console.
I am using Windows 10.
run>>regedit>>Chrome.
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Google\Chrome ::
I am able to get only this path.
HKLM\SOFTWARE\Policies\Google\Chrome:: this path is not availble.
2212:9152:0703/185315.194:ERROR:install_util.cc(589)] Unable to create registry key HKLM\SOFTWARE\Policies\Google\Chrome for reading result=2 [2212:196:0703/185315.598:ERROR:cache_util_win.cc(20)] Unable to move the cache: 5 [2212:196:0703/185315.598:ERROR:cache_util.cc(134)] Unable to move cache folder C:\Users\Anchal\AppData\Local\Google\Chrome\User Data\ShaderCache\GPUCache to C:\Users\Anchal\AppData\Local\Google\Chrome\User Data\ShaderCache\old_GPUCache_000 [2212:196:0703/185315.598:ERROR:disk_cache.cc(169)] Unable to create cache
jarmake posted the solution of this error on github issues:
He made a little tutorial, I'll paste here but if you want the original post, here the source.
Open registry with regedit (just click on Windows start menu and
start typing regedit, it should come up)
From the registry explorer, expand HKEY_LOCAL_MACHINE, and from there
expand SOFTWARE Expand Policies. I was missing everything from this
point.
So what I had to do was to select the Policies by left clicking on
it, and then right click and from the context menu select New > Key
and name it Google. Once that is created, select that and right click
and again select New > Key and name that Chrome.
Select that folder, and right click. Choose New > String. Name it as
MachineLevelUserCloudPolicyEnrollmentToken and leave the value empty.
If you alreade have Google and Chrome under Policies, I think only
adding the key as in step 6 should work. I've attached a picture to
show how it should look like when it's done.
And just as a clarifier. This is under SOFTWARE/Policies, not
directly under SOFTWARE.

cannot stop Chrome from updating from 43 to 44

I am using Selenium and Chrome to write a web test, yesterday my Chrome updated to 44 and now my test does not work, I know that it is an issue with Chrome 44 and we need to wait till the new version is given out.
So I am trying to go bake to chrome 43, i do:
1) Uninstall chrome 44
2) Install chrome 43
but as soon as the installation is done it automatically opens the chrome and it is 44 again !! I went to Run->Service.msc and disabled my chrome to update automatically, but it does not work. I remove the Update folder in User->Myname->AppData->Local->Google->Update but it does not work,
and there is nothing related to updating at chrome://plugins.
I AM STUCK
PLEASE HELP :(
I did all sulosion posted on line but non of them worked,
Have spent a loooong time trying to disable updates (literally hours, reading forums and testing various (some exotic) solutions), and this was driving me crazy. But there what seems an infallible solution (see further down).
Even using the official Google page with the templates did NOTHING : https://support.google.com/installer/answer/146164?hl=en
I followed scrupulously the instructions of that page, the keys in the registry are all correct, but still going to the "About Google Chrome" when the program is opened, I can see the wheel going around and a few seconds later the update is forced and done.
I have tried using the standalone installer of Google, on a Windows 8.1 machine 64Bits - and yes all the keys are set to :
Dword: AutoUpdateCheckPeriodMinutes Value: 0
Dword: DisableAutoUpdateChecksCheckboxValue Value: 1
Dword: UpdateDefault Value: 0
Dword: Update{8A69D345-D564-463C-AFF1-A69D9E530F96} Value: 0
... both in HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update AND HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Google\Update since it is a 64-bit machine.
So the radical solution to prevent the auto-update, if that helps anyone, is to just purely sort the program responsible for the updates itself! (Just deleting it, OR saving a copy, OR renaming it OR even better just in case I one day need to do an update: Zip the content for future potential re-use).
Easy solution :
1- Go to "C:\Program Files (x86)\Google\ and find the folder "update".
2- There are a couple of options to choose from:
A) first method: Rename the folder:
- Right click > Rename > from Update.bak to Update2.bak for example.
- Now launch Chrome: NO MORE UPDATES!! since it can not find the update program !! Finished.
B) second method: Zip the folder:
- Zip the entire folder by making an archive. (Right click the "Update" folder > Send to Compressed (zip) folder)
- A window might ask you to backup/zip and place it on the desktop, click yes. (message: Windows cannot create the compressed folders here. Do you want to be placed on the desktop instead?)
- Move the newly created zip file to the original location. A new window security might pop up > click continue. (message: You need administrator permission to copy this file). [This will be what to unzip if one day you decide to update Chrome - Just remember that when unzipped it will have the following structure : Update > Update > then all the content of the folder. Remember to move everything from inside the second update folder (copy paste) one level up so that is becomes : Update > then all the content of the folder].
- Now that you have a copy just delete the "Update" folder.
- Now launch Chrome: NO MORE UPDATES!! since it can not find the update program !! Finished.
Good luck and Enjoy.
As per Chromium
Turning off Auto-Updates on Windows
To turn off auto-updates of Google Chrome on Windows, you need to instruct Google Update to not update it. To do this, you can either:
Use the Google Update ADM templates provided on this page or as described in this article.
Set the value of
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Update\AutoUpdateCheckPeriodMinutes
to the REG_DWORD value of "0".
You can check for Mac and Linux in the first Link
To get rid of Chrome 44 and go back to 43 I downloaded a stand-alone version of chrome 43 which is an .exe file and I just double clicked on it and it was installed on my computer WITHOUT updating to Chrome 44, to find the link to Chrome 43 have a look to RobW comments to my question above and if the link is stale you can just Google for Chrome Stand-alone, or go to the bottom of this page Google Chrome 64-bit Offline Installer| 45.7 MB.
Have Fun :)

Semicolon in url - chrome vs IE & Firefox

Given a url, my application tries to download the file, e.g., http://foo.com/bar.bat will download bar.bat
Now, given a version number at the end delimited by semi-colon, my application will retrieve that particular version from my source control and download the file.
For e.g., http://foo.com/bar.bat;1 should download bar.bat version 1.
http://foo.com/bar.bat;2 should download bar.bat version 2 etc.
Problem:
Chrome downloads the right version as bat file.
IE (am using IE 11) and firefox downloads the right version but considers 'bat;1' or 'bat;2' as the file type instead of 'bat'.
I have mime type as application/bat. I tried with '%3b' instead of ';' but same issue.
No idea what else to check.
Any help would be appreciated.
Why don't you use http://foo.com/bar.bat?version=1 instead? this should work on every browser properly because it is a standard.
I resolved the issue by making a code change in Perl (with Google's assistance, of course).
In case, anyone intererested or face this problem in future, here is what i did.
In perl code, redirect to http://foo.com/bar.bat;1 was happening with relative path.
print $query->redirect(-uri => $redirect); # $redirect being '/bar.bat;1'
I gave absolute path like below
my $RemoteHost = $query->url(-base=>1); #this gets http://foo.com
my $newredirect = "$RemoteHost$redirect";
print $query->redirect(-uri => $newredirect);
I will mark erikvold's as answer since he triggered me to look at the perl code.
Thanks Jonathan and erikvold.

EditDocument doesn't always work in Chrome

I am having a similar problem to MicrosoftOfficeEditDocument didn't work in Chrome.
I did download the updated library as said in the answer and it works fine with Office 2013 but not with 2010.
With Office 2010, I have some files that open and some that don't, they are not always the same ones. I tried with .doc, .docx, .ppt, .pptx, .xls and .xlsx.
I call the edit document fonction with :
ITHit.WebDAV.Client.DocManager.EditDocument(sDocumentUrl, javaAppletFilePath);
EDIT :
It actually seems to be a problem of length of file url. When my file url (sDocumentUrl) is longer than the length of my script url in which I call EditDocument it works perfectly fine. But when it is shorter, the end of the script url is added after sDocumentUrl which makes the call fail. And this only happens with Chrome and Office 2010.
Any way to make this work ?
Add '\0' to the end of the URL
Add a '\0' (null) to the end of the string you are passing to MicrosoftOfficeEditDocument(). Like MicrosoftOfficeEditDocument(path + '\0');. Also, you should use MicrosoftOfficeEditDocument() instead of EditDocument() because EditDocument() will try to call JavaEditDocument() because of the null terminated string.
This is a solution taken from here - https://code.google.com/p/chromium/issues/detail?id=269183#c5
For more info - opening webdav files in Chrome via the Office Authorization plug-in for NPAPI browsers fails for certain files
Check for ActiveX first
However, you should not add the '\0' to the path when MicrosoftOfficeEditDocument() will open the document via the SharePoint.OpenDocument ActiveX object or else the ActiveX plugin will not recognize the file format via extension and try to open the document via undefined:ofe|u| instead of ms-word:ofe|u| for example. To do this you should check for ActiveX before appending the '\0'.
if (!('ActiveXObject' in window)) {
path = path + '\0';
}
ITHit.WebDAV.Client.DocManager.MicrosoftOfficeEditDocument(path)
Warning: this solution breaks MicrosoftOfficeEditDocument in Firefox. Firefox does not like the \0 terminated string.