Launch Windows 10 Settings using JavaScript? - javascript

Using chrome, I tried going to Microsoft Store and when I click the button GET to install an app, a dialog shows up and asks to open Microsoft Store, of course after clicking it I'm redirected to Microsoft Store App.
I wanted to do the same by launching Windows Settings and if possible I wanted to redirect the client specifically to Settings > Update & Security > Check for Updates.
I have a thought that it can be done using JavaScript but I'm not sure. I found the same question but I think it is specifically to Firefox and it confused me.

It appears that it is possible, but I'm not sure though if this is part of JavasScript, the list of commands can be found in Microsoft docs, there are multiple options and not just for Windows Settings.
What I am looking for is ms-settings:windowsupdate.
Example of usage
Check for updates

Related

Chrome SuppressDifferentOriginSubframeJSDialogs setting override using JS?

The Chrome dev team apparently just rolled out a new "feature" called SuppressDifferentOriginSubframeJSDialogs, which makes it so alert+confirm boxes from an iFrame on a different domain than the parent does not show up, by default: https://www.chromestatus.com/feature/5148698084376576
This means if you have an embedded form, and you relied upon the standard JavaScript alert to inform the user of errors (or a confirm to ensure they want to make a change), it now does nothing, completely destroying the UX.
Obviously we can overwrite the built-in alert and confirms with custom ones, but moving away from what is built into the browser now introduces re-designs for every UI (mobile, tablet, laptop, desktop, etc.) instead of just relying upon proven, built-in technology.
Is there a way to change this cross-domain setting, or to whitelist specific domains to override this feature? We do have access to the parent site with an external JS include file (obviously, otherwise this would be a wide-open back door).
To Disable SuppressDifferentOriginSubframeJSDialogs , which block js Dialog box pop up
If you are single users ( Windows ) :
Right click on desktop and create a shortcut
Windows will pop up a screen and ask you "type the location of the item:"....now paste those value into the textbox
"C:\Program Files\Google\Chrome\Application\chrome.exe" --disable-features=SuppressDifferentOriginSubframeJSDialogs
Click "next" then "finish" button to create the shortcut
Now you shall see a chrome shortcut created in your desktop .Close all active Chrome instance ( if exists ) then launch the shortcut and you will found Js pop up wont block anymore.
Tips :
If you want push this fix to all your cooperate domain users , you may consider use Domain group policy to update Chrome shortcut value or use custom domain logon script logic to do so
I found a setting in the latest Chrome GPO template that creates a reg entry that will deal with this and the same reg entry placed in the Edge location also resolves the error there. (at least it worked for the problem that came up for us yesterday FWIW)
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
"SuppressDifferentOriginSubframeDialogs"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
"SuppressDifferentOriginSubframeDialogs"=dword:00000000
The latest Edge GPO templates do not have the setting yet, but I imagine it's only a matter of time.
Today I tried it again with Google Chrome Version 92.0.4515.131 and it suddenly worked again. Can anyone confirm this?
Add for Mac users.
If you use mac OS:
Quit all running instances of Chrome.
Run the terminal application.
In the terminal, run the command:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --disable-features="SuppressDifferentOriginSubframeJSDialogs"
You can see more details here :
https://trailblazer.salesforce.com/issues_view?title=salesforce-functionality-impacted-in-[%E2%80%A6]oss-origin-iframe-javascript-dialogs&Id=a1p4V000002BRMX

Is there any way to force a link to open in Chrome from Facebook's in-app browser?

I've got a web app that requires the ability to print. Facebook's in-app implementation of Chrome doesn't allow printing. Currently, I'm giving the user instructions on how to open in chrome themselves in place of the print button I give normal users. But I'd prefer to just open Chrome for them when they get to that page, or at the very least provide a button/link that would open the page in Chrome instead of forcing them to find the settings button and figure out how to open Chrome themselves.
I've tried using the googlechrome://myurl.com approach, and Chrome opens, but the specified url doesn't load.
I've looked into Google's Intent option but I wasn't able to figure out how to open Chrome with that method.
Is there a way to accomplish this in javascript? or by some url scheme in an href attribute?
So far, all the other answers I've found give explanations for how to do this from an Android App, but not from a website.
** Update: The googlechrome://myurl.com seems to work fine from iOS in the native facebook app. It does not appear to work correctly using the native facebook app in Android.
Try
googlechrome://navigate?url=example.com
for Android users.
Reference from https://stackoverflow.com/a/12013755/9514189

Click a button in Google Chrome not using Selenium

I'm trying to install a google chrome extension on a large amount of my desktop computers using python. I've gotten Selenium to open a simulated browser with the extension, but that doesn't actually download it to the computer, so that doesn't necessarily help. My current code is
import webbrowser
webbrowser.open_new_tab(
"https://panelresearch.google.com/browser/extension/download")
This just opens the page where I can find the extension, can anyone show me a library where I can click buttons that are on this page?
Additionally, I'll need to identify the extension popup and I realized that I cannot inspect any elements in that popup.
As far as I know, there is no way of operating the extension popup using any API other than simulating the clicking on OS level.
When you're testing an extension using Selenium, you have to specify a custom profile as an argument during the start of the process connected to the WebDriver. More info here or use a special ChromeDriver API.
If you just want to force install an extension in an enterprise/educational environment, you can follow this guide.
You can also edit already existing profiles (to some extend and in my experience unreliably) by editing the Preferences file in the profile directory. Just make sure you have backups and an instance of Chrome is not running with that profile.
Good luck.

VS 2013 WPF WebBrowser Enable Javascript

I'm trying to make a custom browser with some buttons to instantly switch to the websites I visit most often and have click button logins etc. (ease of access)
wb.Navigate("http://www.________.com");
So the problem is when I get on the website I have some script errors pop up, I have activex to silent them but when it logs in as the website proccesses my login request it comes back with "You need javascript enabled".
Now I have read a lot and the only things that seem to be relevant was to change the registry for the program or to relax my internet options both which have failed and all the other information is from like 2007 which references are no longer available.
Any ideas how to wb.IsScriptsEnabled = true;?
After spending all day on this I discovered there is
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER)
SOFTWARE
Microsoft
Internet Explorer
Main
FeatureControl
FEATURE_BROWSER_EMULATION
yourapp.exe = (DWORD) version
Nobody has mentioned (HKEY_CURRENT_USER) So I tried it and it appears to be working now. Will update if not so.

How to run and install EXE file from the web browser using JS without user approve

I want to implement in my website a functionality like in google chrome website, that a user click on a website form and the file will auto download and install itself without any user approve or interferance.
Here is the google chrome website: https://www.google.com/chrome/index.html?hl=iw
I know that they use clickonce technology by ms for IE and oneclick technology by google for all other browsers, but there is a way that i can also use thier code and their technology to run my own files?
I know they also use google update task that runs on windows background but I dont know how to use it with my own files.
As far as I know, this functionality is possible only if the client has .NET Framework (version 4 I guess), and your domain is in the trusted domains list of the user's preferences for this functionality. So this would work only on Windows platform, and your domain need to be added to the mentioned list (what is unlikely to happen I guess). A short answer is NO, you can't do this, if you are not a corporation like Google.
Bonus: You don't need it, users do not like to be tricked, they want to know everything that happens with they computer.
For security reason, you cannot access file from your website. What would happen if a user open a website, and they got some programs installed in their machine? That's gonna be serious problem

Categories