1

Resolved

Example Modern UI installer HTML?

description

We have searched high and low on the internet as to how to kick off a powershell script from HTML, however, we haven't found any examples... Can you provide an "example" HTML file that would allow a user to install a LOB Windows Store App from the Company Store?

Thanks

file attachments

comments

AntoineJ wrote Feb 23, 2013 at 7:51 AM

Hi jhandel,


That's a good question. To be exact I did not try to launch a powershell script from a HTML file, maybe that's possible, but my sample here launch a bat file, and in the bat file I'm launching a powershell command (my command is very simple, if you want you can launch a powershell script that will also install dependencies, using a command like "powershell.exe -executionPolicy bypass \yourserver\yourshare\yourscript.ps1").

There's a few prerequisites, you need to have:
  • a web server, you can't use a standalone HTML file
  • configure your web server to allow the launch of bat files. For this you should add a MIME Type to handle .bat files. You can do it direcly in the GUI or in the web.config file like this:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            __<mimeMap fileExtension=".bat" mimeType="application/octet-stream" />__
        </staticContent>
    </system.webServer>
</configuration>
Finally, find attached to this post an example of the web page you can use. Note that we launch the bat file using a simple weblink.

Tell me if this is more clear, or if you need more information.

Antoine

wrote Mar 27, 2013 at 9:57 PM

wrote May 16, 2013 at 10:15 AM

wrote May 16, 2013 at 10:15 AM

wrote Jun 14, 2013 at 7:21 AM