← Choose language | Выберите язык
Lightweight wrapper for running websites and web applications based on Microsoft Edge (WebView2), with support for a native API.
ProtonShell allows you to run web content in separate windows, use custom JavaScript scripts, and interact with Windows through the API: work with files and folders, the clipboard, and system applications, open standard file and folder selection dialogs, and control the application window.
ProtonShell is suitable for creating standalone applications based on existing web services, as well as for running your own web applications. The Apps folder contains examples of ready-to-use applications.
- Install Edge WebView2 Runtime.
- Place the
index.htmlfile in the application folder or enter the URL address, in the configuration file. - Change the name, window parameters, icon, proxy, UserAgent and other settings, in the
Config.iniconfiguration file. - If necessary, change the
exeicon, using Resource Hacker or specify the icon in the configuration file.
Version for Windows 10, 11.
When using startup parameters, reading the configuration file is not used, except for the -c parameter (custom configuration file).
-c anotherapp.ini - read configuration file, with a different name. When used, other startup parameters are not used and all parameters are read from the configuration file.
-f index.html - the path to the html file (relative or full).
-a "https://youtube.com/tv" - the web site address.
-n "My app" - the title of the application.
-i MyIcon.ico - path to the icon.
-u "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0" - user agent.
-s 1.js - user script (userscript).
-w - width of the application.
-h - height of the application.
-fullscreen - fullscreen mode.
-p - change system proxy to the specified one (format: IP:PORT).
-rp - return past system proxy, for cases of changing proxy to another one.
-b 3 - frame style (None = 0, Sizeable = 1, Single = 2, Dialog = 3, SizeToolWin = 4, ToolWindow = 5).
-t 50 - indent from the top.
-l 50 - indent to the right.
-d - enable debugging mode.
First, include the ProtonShell API in your HTML application:
<script src="protonshell.js"></script>| Method | Description | Parameters | Example |
|---|---|---|---|
app.close() |
Closes the application. | - | app.close(); |
app.fullscreen() |
Switches the window to fullscreen mode. | - | app.fullscreen(); |
app.restore() |
Restores the window to normal mode. | - | app.restore(); |
app.setTitle(title) |
Sets the window title. | title - window title. |
app.setTitle("My App"); |
| Method | Description | Parameters | Example |
|---|---|---|---|
system.open(path, args) |
Opens a file, folder, or URL using Windows. | path - file path, folder path, or URL.args - optional arguments. |
system.open("https://example.com"); |
| Method | Description | Parameters | Example |
|---|---|---|---|
file.exists(path) |
Checks whether a file exists. | path - file path. |
file.exists("test.txt", callback); |
file.writeText(path, text) |
Writes text to a file. | path - file path.text - file contents. |
file.writeText("test.txt", "Hello", callback); |
file.readText(path) |
Reads a text file. | path - file path. |
file.readText("test.txt", callback); |
file.delete(path) |
Deletes a file. | path - file path. |
file.delete("test.txt", callback); |
| Method | Description | Parameters | Example |
|---|---|---|---|
folder.list(path) |
Returns the contents of a folder. | path - folder path. |
folder.list("C:\\Apps", callback); |
folder.exists(path) |
Checks whether a folder exists. | path - folder path. |
folder.exists("C:\\Apps", callback); |
folder.create(path) |
Creates a folder. | path - path to the new folder. |
folder.create("C:\\Apps\\Test", callback); |
folder.delete(path) |
Deletes a folder. | path - folder path. |
folder.delete("C:\\Apps\\Test", callback); |
| Method | Description | Parameters | Example |
|---|---|---|---|
clipboard.get() |
Gets text from the clipboard. | - | clipboard.get(callback); |
clipboard.set(text) |
Sets text in the clipboard. | text - text to copy. |
clipboard.set("Hello", callback); |
| Method | Description | Parameters | Example |
|---|---|---|---|
dialog.openFile(options) |
Opens a file selection dialog. | options.title - dialog title.options.filter - file filter.options.defaultPath - initial folder. |
dialog.openFile({ title: "Open file", filter: "Text files (*.txt)|*.txt" }, callback); |
dialog.saveFile(options) |
Opens a file save dialog. | options.title - dialog title.options.filter - file filter.options.defaultPath - initial folder. |
dialog.saveFile({ title: "Save file", filter: "Text files (*.txt)|*.txt" }, callback); |
dialog.selectFolder(options) |
Opens a folder selection dialog. | options.title - dialog title.options.allowCreateFolder - allows creating a new folder. |
dialog.selectFolder({ title: "Select folder", allowCreateFolder: true }, callback); |
The callback parameter is optional. If you don't need the result, simply omit the callback parameter.
file.readText("test.txt", function(response) {
alert(response);
});The callback receives a JSON response from ProtonShell.
For detailed parameters, options, and response formats, see the examples in index.html.
For fast debugging you can enable a special mode in which the following is available: resizing, changing User agent, clearing all data. To enable it, change the Debug parameter to 1.
r57zone@gmail.com







