Open Chrome via PowerShell with parameter for SSO - windows

we are using a PowerShell-script to start Chrome and open a specific website with some parameters like "host-rules" or "kiosk".
Unfortunately it is not possible to add the site to the Internet Explorer settings "local intranet" to make SSO working (because of the large infrastructure), but it is necessary to add the site there.
I tryed several searches via google, but I couldn't find what I'm looking for.
Who can help?
Thanks.

You can start chrome.exe using various commandline switches like
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk "https://yoursite.com"
A complete (?) list of switches can be found here

Related

Is there a Microsoft Edge equal of chrome --app to open a web app in msedge from command line

I want to open jupyter lab as a web app in Microsoft Edge. Like it is possible in chrome.
I've looked for configurations in firefox but they either don't support localhost or they are complex by making a new profile.
If you have the website link of the app, you could use the code below via Command Prompt (cmd) to open it in Microsoft Edge:
start microsoft-edge:http://www.google.com
The result is like below:
Late into the question, but: Basically
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --app="https://www.google.com"
... works. this can also be put into a shortcut and it shows up with an own icon in the Taskbar this way.
The exact same way it works if you first create a shortcut e.g. on your Desktop, starting with
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
changing it to the initial example from above via the shortcut properties... this will still miss the "correct" shortcut icon for the "app", anyway, it works.
BTW.: I also used Firefox for this, unfortunately they dropped support for --web-app cmd support in early 2021 ;/

Make an Internet Shortcut file open Internet Explorer

I currently have an Internet Shortcut file "My Link.url":
[InternetShortcut]
URL=https://somewebsite.com
I believe Internet Shortcut files are always opened in the default browser.
Does anyone know how to force opening in Internet Explorer?
I have come across .website files but Windows Security Shield (is that the right name?) blocks it opening.
Use case: *nix server creating a file that will be downloaded to the users desktop.
You should be able to use a normal .lnk shortcut point it to iexplore.exe and supply your url as the first parameter

Open a Web Page in a Windows Batch FIle

I have a batch file that does a bunch of things and at the end needs to open up a web browser to a page. Is there a way to, in essence, call ShellExecute on a http to open the web page?
Windows Command Prompt
You can use the start command to do much the same thing as ShellExecute. For example
start "" http://www.stackoverflow.com
This will launch whatever browser is the default browser, so won't necessarily launch Internet Explorer.
1.To run from the default browser, use
start http://www.stackoverflow.com
Please make sure that the appropriate browser is set as default at Control Panel-> default program :
2.To launch page from specific browser, one can use
start "iexplore.exe" http://www.stackoverflow.com
start "chrome.exe" http://www.stackoverflow.com
start "firefox.exe" http://www.stackoverflow.com
Unfortunately, the best method to approach this is to use Internet Explorer as it's a browser that is guaranteed to be on Windows based machines. This will also bring compatibility of other users which might have alternative browsers such as Firefox, Chrome, Opera..etc,
start "iexplore.exe" http://www.website.com
When you use the start command to a website it will use the default browser by default but if you want to use a specific browser then use start iexplorer.exe www.website.com
Also you cannot have http:// in the url.
hh.exe (help pages renderer) is capable of opening some simple webpages:
hh http://www.nissan.com
This will work even if browsing is blocked through:
HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer
start did not work for me.
I used:
firefox http://www.stackoverflow.com
or
chrome http://www.stackoverflow.com
Obviously not great for distributing it, but if you're using it for a specific machine, it should work fine.

How can we make a ftp link open in windows explorer on Windows?

Been trying to find a way to do this for a while.
Opening a link in an windows explorer window instead of a browser.
For example using this link : ftp://username:pass#ftp.domain.com:80
And opening it in Windows Explorer.
Is it possible to dictate how windows should react when clicking on that link in a email ?
Thank you Fabian H!
Your solution works fine for me :-)
I made just a small change to your code, infact I wrote:
[HKEY_CLASSES_ROOT\IE.FTP\shell\open\command]
#="C:\\Windows\explorer.exe" %1
Instead of:
[HKEY_CLASSES_ROOT\IE.FTP\shell\open\command]
#="C:\\Windows\\explorer.exe %1"
This second one didn't work for me :-(
But now I can finally enjoy using explorer.exe as the default FTP Client!!
PS:
Tested on WIndows 7
Save these lines in a file with a file name ending .reg and double klick the file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\IE.FTP\shell\open\command]
#="C:\\Windows\\explorer.exe %1"
[HKEY_CLASSES_ROOT\IE.FTP\shell\open\ddeexec\Application]
#="Explorer"
Tested on WIndows 8.1 64bit.
Thanks to Perneel for his link.
The Windows registry keys shown before didn't work for me, but this works:
HKEY_CURRENT_USER\Software\Microsoft\FTP
Use Web Based FTP = "yes"
Just change value to "no".
(Windows 7 Pro x64)
I was fumbling around looking for how to do this and I ultimately decided to go with the "Add Network Location" wizard method as described here by "nhinkle".
However after doing so, I got a link that generated this shortcut:
ftp://MYFTP_LOGINID#FTPADDRESS/Some/Folder/Navigation/&Stuff/
More what it actually looks like:
ftp://123445_65432#78.13.223.184/root/main/servers/current/
Then was prompted for my login credentials, and thats it. Does not open in Chrome and I just did Send To > Desktop (shortcut) and moved that shortcut to the folder I wanted it in. Now I can open the FTP location from explorer by hitting the link instead of typing the address into the address bar, and it is not opening up in any internet browsers.
I only have one ftp account, dont know much about any background magic that the wizard may have done regarding registry/etc, and I feel like deleting the shortcut wont really undo any of that if it did happen, so if someone could test this and confirm whether or not it works, that'd be great.
Just my 2c :)
HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\ftp\UserChoice
Check it out, i got the above answer working by deleting this entry
For regularly used FTP sites, if you don't want to make registry edits, create a shortcut using the following format and your site will open in Windows Explorer.
%windir%\explorer.exe ftp://

How to launch an application from a browser?

Is it possible to launch an application from a browser? I am not talking about opening a file from a browser (like open a PDF with Adobe Reader), but rather opening a new (blank) instance of an application that is installed on the user's machine.
Hypothetical situation: User browses a website that lists computers that can be managed via RDP. He clicks on a link to 192.168.1.10, that link opens Microsoft RDP client (mstsc.exe) with that ip address already filled out.
I am talking strictly about Windows universe.
Is that thing even doable outside of ActiveX and IE?
Is it wise to attempt this in IE with ActiveX?
The correct method is to register your custom URL Protocol in windows registry as follows:
[HKEY_CLASSES_ROOT\customurl]
#="Description here"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\customurl\shell]
[HKEY_CLASSES_ROOT\customurl\shell\open]
[HKEY_CLASSES_ROOT\customurl\shell\open\command]
#="\"C:\\Path To Your EXE\\ExeName.exe\" \"%1\""
Once the above keys and values are added, from the web page, just call "customurl:\\parameter1=xxx&parameter2=xxx" . You will receive the entire url as the argument in exe, which you need to process inside your exe. Change 'customurl' with the text of your choice.
You can't really "launch an application" in the true sense. You can as you indicated ask the user to open a document (ie a PDF) and windows will attempt to use the default app for that file type. Many applications have a way to do this.
For example you can save RDP connections as a .rdp file. Putting a link on your site to something like this should allow the user to launch right into an RDP session:
Server 1
#AbhijithCR 's reply works well. To register the protocol via a .bat file, do something like this
set key=customurl
reg add HKCR\%key% /ve /d "URL:Description"
reg add HKCR\%key% /v "URL Protocol" /d ""
reg add HKCR\%key%\shell
reg add HKCR\%key%\shell\open
reg add HKCR\%key%\shell\open\command /ve /d ""c:\path to\your.exe" ""%%1"""
For me getting all the quotes and the double percent signs right was the tricky part.
Some applications launches themselves by protocols. like itunes with "itms://" links. I don't know however how you can register that with windows.
We use a sonicwall vpn. It launches a java applet that launches mstc with all the credentials setup. You really can't do this without a java applet or activex plugin.
Microsoft uses this technique itself on their small business server for getting inside the network. I wouldn't say it is a terrible idea, as long as platform independence isn't important.
You can use SilverLight to launch an application from the browser (this will work only on IE and Firefox, newer versions of chrome don't support this)
Example code here
I achieved the same thing using a local web server and PHP. I used a script containing shell_exec to launch an application locally.
Alternatively, you could do something like this:
Notepad

Resources