start IE in metro mode from script

Hello,

for a kiosk setup I boot a windows 8 enterprise machine to a powershell script (by editing the "shell" registry value). The powershell script starts Internet Explorer with a start page. Users never see the start screen.

IE opens in desktop mode, but I would prefer metro mode since it is a touch device.

Is there a way to programmatically force internet explorer to open in metro look?

Thanks!

regards,

Brecht.

September 19th, 2013 4:10pm

Yes, you can use either the IEAK tool or Group Policy Preferences to set the startup mode for Internet Explorer.  To do it through GPP, create a new preferences here:  User Configuration>Preferences>Control Panel Settings>Internet Settings

Then on the Programs tab, uncheck the box to Open Internet Explorer Tiles on the Desktop.

Free Windows Admin Tool Kit Click here and download it now
September 19th, 2013 8:38pm

Yes, you can use either the IEAK tool or Group Policy Preferences to set the startup mode for Internet Explorer.  To do it through GPP, create a new preferences here:  User Configuration>Preferences>Control Panel Settings>Internet Settings

Then on the Programs tab, uncheck the box to Open Internet Explorer Tiles on the Desktop.

September 19th, 2013 8:38pm

The settings should look like this:

Free Windows Admin Tool Kit Click here and download it now
September 19th, 2013 8:41pm

I'll check out the gpp, thank you. I have seen it but I assumed that it only applies to clicked links in a browser window, not to the starting of the browser itself (which I do by executing "C:\Program Files\Internet Explorer\iexplore.exe")

Brecht.

September 20th, 2013 1:19pm

Update: with this setting on, IE still opens in desktop mode when I start it from script.
Free Windows Admin Tool Kit Click here and download it now
September 23rd, 2013 6:43pm

executing "C:\Program Files\Internet Explorer\iexplore.exe")

I wouldn't expect that to work.  What does the Command line look like then?

Tip: To examine what you are trying to accomplish from that perspective you can use wmic.

wmic.exe  Path Win32_Process  where  (Name = 'iexplore.exe')  get  CommandLine, ProcessId

FWIW I don't think you can add the necessary switches onto the CommandLine via a Desktop start command.  An alternate approach that I would try is SendKeys (or some third-party alternative) but that seems problematic from a reliability perspective.

 

Good luck

September 23rd, 2013 8:32pm

Thank you for your response.

Hello,

I simply execute "start-process" with "C:\Program Files\Internet Explorer\iexplore.exe" and an url.

This is in a powershell script which is executed as a "shell" script instead of explorer.exe.

I was hoping for something like "iexplore.exe -metrostyle" which makes sure it starts as a metro app.

There is a way to start apps by using the appID, but I can't find the app id for internet explorer. IE seems to be a special case.
http://www.thinkboxly.com/2012/12/windows-8-app-shortcuts-on-desktop.html

Free Windows Admin Tool Kit Click here and download it now
September 25th, 2013 9:26am

I was hoping for something like "iexplore.exe -metrostyle" which makes sure it starts as a metro app.

There is but as I indicated it doesn't work from Start.   Did you try the WMI experiment I gave you?

To see what ThinkBoxly is looking at go here in the registry:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\Associations\UrlAssociations

Notice that there is an association for IE there, called  http (what a surprise)?   So, if the option in the Programs tab doesn't make that one go to MUF IE I think you may be stuck with my idea of using the keyboard or emulation of using the keyboard, e.g. via a keyboard macro.   However, sometimes my keyboard's Home button somehow overrides my preference to always open implicitly in Desktop IE so maybe it is doing something that you should know about for your requirement?   FWIW I have had to abandon using it because of that quirk and instead now always launch an IE window by clicking on my Taskbar icon.

 
(!)  Thinking about this some more.  Maybe you could duplicate whatever a preference for  MUF IE causes under a new UrlAssociation called MUFIE?  E.g. perhaps you can find an explicit ProgID for MUF IE instead of the one that is there?  That would be cool!

 
Good luck

Robert
---

September 25th, 2013 12:11pm

I'm sorry, I haven't been able to check this yet. I upvoted your reply for the effort :-) I'll get back once I can try this out.
Free Windows Admin Tool Kit Click here and download it now
October 23rd, 2013 7:50am

This seems to work for Win8.1 as well:

https://pricklytech.wordpress.com/2014/10/05/quick-tip-how-to-enable-internet-explorer-modern-app-in-windows-10/

April 17th, 2015 6:04am

This seems to work for Win8.1 as well:

https://pricklytech.wordpress.com/2014/10/05/quick-tip-how-to-enable-internet-explorer-modern-app-in-windows-10/

Free Windows Admin Tool Kit Click here and download it now
April 17th, 2015 10:02am

This seems to work for Win8.1 as well:

https://pricklytech.wordpress.com/2014/10/05/quick-tip-how-to-enable-internet-explorer-modern-app-in-windows-10/

April 17th, 2015 10:02am

Got something.  Its very kludgy, but it works for me.  Im on Win 8.1.  Feel free to adapt to your needs. 

I use Firefox as my default browser.  In short, this temporarily makes IE the default browser, swaps to Metro mode, sends keystrokes to fire up IE in Metro mode, then resets the default browser to Firefox in the background.  Metro mode IE wont start unless IE is set as the default browser.  From what I have tested once open IE continues to operate normally in Metro mode even after it is no longer the default browser.

The basis is an Autohotkey script.  It makes registry changes to change the default browser.  The registry files were derived from using Regshot from http://sourceforge.net/projects/regshot/ to look at the before and after state of the registry when changing back and forth between IE and Firefox as the default browser.  This was a tedious effort as Regshot outputs text files that need to be edited to match .reg file syntax.  Feel free to make your own if desired.  This will be necessary if you want to use another browser other than Firefox as your default.

  1. Download and install Autohotkey from http://www.autohotkey.com/
  2. Download IE_Metro.zip from http://www.mediafire.com/download/li1u9bc4xkksydj/IE_Metro.zip
  3. Extract files from IE_Metro.zip to location of your choice (path_to_your_files)
  4. Download PSTools from https://technet.microsoft.com/en-us/sysinternals/bb896649.aspx
  5. Place psexec.exe from PStools into the folder with your files from IE_Metro.zip
  6. Edit the text file IE_Metro.ahk to update with the path to your files (path_to_your_files)
  7. If you open the Metro start screen with any other keystrokes than the Win key, modify the script accordingly on line 15.  See https://www.autohotkey.com/docs/commands/Send.htm
  8. Compile your IE_Metro.ahk to IE_Metro.exe with Autohotkey (can right click to compile)
  9. Make a windows shortcut to your IE_Metro.exe (drag while holding Alt key or right click)
  10. Right click your shortcut and go to Properties, then go to Shortcut tab Advanced and tick Run as Administrator
  11. Right click the shortcut and choose Pin to Start.  You can also copy anywhere you would like to use it from desktop mode.
  12. Test and enjoy!  It might be necessary to modify the sleep delays in the Autohotkey script depending on the speed of your machine.  Besides your desktop mode shortcuts to your .exe, youll have one on your Metro start screen as well.

Free Windows Admin Tool Kit Click here and download it now
May 2nd, 2015 12:30am

Got something.  Its very kludgy, but it works for me.  Im on Win 8.1.  Feel free to adapt to your needs. 

I use Firefox as my default browser.  In short, this temporarily makes IE the default browser, swaps to Metro mode, sends keystrokes to fire up IE in Metro mode, then resets the default browser to Firefox in the background.  Metro mode IE wont start unless IE is set as the default browser.  From what I have tested once open IE continues to operate normally in Metro mode even after it is no longer the default browser.

The basis is an Autohotkey script.  It makes registry changes to change the default browser.  The registry files were derived from using Regshot from http://sourceforge.net/projects/regshot/ to look at the before and after state of the registry when changing back and forth between IE and Firefox as the default browser.  This was a tedious effort as Regshot outputs text files that need to be edited to match .reg file syntax.  Feel free to make your own if desired.  This will be necessary if you want to use another browser other than Firefox as your default.

  1. Download and install Autohotkey from http://www.autohotkey.com/
  2. Download IE_Metro.zip from http://www.mediafire.com/download/li1u9bc4xkksydj/IE_Metro.zip
  3. Extract files from IE_Metro.zip to location of your choice (path_to_your_files)
  4. Download PSTools from https://technet.microsoft.com/en-us/sysinternals/bb896649.aspx
  5. Place psexec.exe from PStools into the folder with your files from IE_Metro.zip
  6. Edit the text file IE_Metro.ahk to update with the path to your files (path_to_your_files)
  7. If you open the Metro start screen with any other keystrokes than the Win key, modify the script accordingly on line 15.  See https://www.autohotkey.com/docs/commands/Send.htm
  8. Compile your IE_Metro.ahk to IE_Metro.exe with Autohotkey (can right click to compile)
  9. Make a windows shortcut to your IE_Metro.exe (drag while holding Alt key or right click)
  10. Right click your shortcut and go to Properties, then go to Shortcut tab Advanced and tick Run as Administrator
  11. Right click the shortcut and choose Pin to Start.  You can also copy anywhere you would like to use it from desktop mode.
  12. Test and enjoy! 

It might be necessary to modify the sleep delays in the Autohotkey script depending on the speed of your machine.  Besides your desktop mode shortcuts to your .exe, youll have one on your Metro start screen as well. Depending on your settings, you may have to accept a UAC prompt since you're running the script as Administrator.


  • Edited by rocketpaddy 17 hours 42 minutes ago added note about UAC prompt
May 2nd, 2015 4:27am

Got something.  Its very kludgy, but it works for me.  Im on Win 8.1.  Feel free to adapt to your needs. 

I use Firefox as my default browser.  In short, this temporarily makes IE the default browser, swaps to Metro mode, sends keystrokes to fire up IE in Metro mode, then resets the default browser to Firefox in the background.  Metro mode IE wont start unless IE is set as the default browser.  From what I have tested once open IE continues to operate normally in Metro mode even after it is no longer the default browser.

The basis is an Autohotkey script.  It makes registry changes to change the default browser.  The registry files were derived from using Regshot from http://sourceforge.net/projects/regshot/ to look at the before and after state of the registry when changing back and forth between IE and Firefox as the default browser.  This was a tedious effort as Regshot outputs text files that need to be edited to match .reg file syntax.  Feel free to make your own if desired.  This will be necessary if you want to use another browser other than Firefox as your default.

  1. Download and install Autohotkey from http://www.autohotkey.com/
  2. Download IE_Metro.zip from http://www.mediafire.com/download/li1u9bc4xkksydj/IE_Metro.zip
  3. Extract files from IE_Metro.zip to location of your choice (path_to_your_files)
  4. Download PSTools from https://technet.microsoft.com/en-us/sysinternals/bb896649.aspx
  5. Place psexec.exe from PStools into the folder with your files from IE_Metro.zip
  6. Edit the text file IE_Metro.ahk to update with the path to your files (path_to_your_files)
  7. If you open the Metro start screen with any other keystrokes than the Win key, modify the script accordingly on line 15.  See https://www.autohotkey.com/docs/commands/Send.htm
  8. Compile your IE_Metro.ahk to IE_Metro.exe with Autohotkey (can right click to compile)
  9. Make a windows shortcut to your IE_Metro.exe (drag while holding Alt key or right click)
  10. Right click your shortcut and go to Properties, then go to Shortcut tab Advanced and tick Run as Administrator
  11. Right click the shortcut and choose Pin to Start.  You can also copy anywhere you would like to use it from desktop mode.
  12. Test and enjoy! 

It might be necessary to modify the sleep delays in the Autohotkey script depending on the speed of your machine.  Besides your desktop mode shortcuts to your .exe, youll have one on your Metro start screen as well. Depending on your settings, you may have to accept a UAC prompt since you're running the script as Administrator.


  • Edited by rocketpaddy Saturday, May 02, 2015 1:40 PM added note about UAC prompt
Free Windows Admin Tool Kit Click here and download it now
May 2nd, 2015 4:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics