Update index.html: Add interactive no-admin generator for easy batch script creation
Browse files- index.html +39 -17
index.html
CHANGED
|
@@ -1,19 +1,41 @@
|
|
| 1 |
<!doctype html>
|
| 2 |
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
<!doctype html>
|
| 2 |
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8" />
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 6 |
+
<title>NO-ADMIN Utility</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css" />
|
| 8 |
+
</head>
|
| 9 |
+
<body>
|
| 10 |
+
<div class="card">
|
| 11 |
+
<h1>NO-ADMIN Utility</h1>
|
| 12 |
+
<p>Select your installer or executable file below. We’ll generate a .bat script that runs the installer without requiring admin privileges.</p>
|
| 13 |
+
<input type="file" id="fileInput" accept=".exe,.msi,.bat,.cmd" />
|
| 14 |
+
<button id="generateButton">Generate Script</button>
|
| 15 |
+
<a id="downloadLink" style="display:none; margin-top:1rem;">Download your NO-ADMIN BAT file</a>
|
| 16 |
+
<p style="margin-top:1rem;">Instructions: place this batch file in the same folder as your installer and double-click it to run. This uses the RunAsInvoker compatibility layer to bypass admin prompts.</p>
|
| 17 |
+
</div>
|
| 18 |
+
<script>
|
| 19 |
+
const fileInput = document.getElementById('fileInput');
|
| 20 |
+
const generateButton = document.getElementById('generateButton');
|
| 21 |
+
const downloadLink = document.getElementById('downloadLink');
|
| 22 |
+
generateButton.addEventListener('click', () => {
|
| 23 |
+
const file = fileInput.files[0];
|
| 24 |
+
if (!file) {
|
| 25 |
+
alert('Please select a file to wrap.');
|
| 26 |
+
return;
|
| 27 |
+
}
|
| 28 |
+
const fileName = file.name;
|
| 29 |
+
const scriptContent = '@echo off\r\n' +
|
| 30 |
+
'set __COMPAT_LAYER=RunAsInvoker\r\n' +
|
| 31 |
+
'start "' + fileName + '"\r\n';
|
| 32 |
+
const blob = new Blob([scriptContent], { type: 'text/plain' });
|
| 33 |
+
downloadLink.href = URL.createObjectURL(blob);
|
| 34 |
+
const baseName = fileName.substring(0, fileName.lastIndexOf('.')) || fileName;
|
| 35 |
+
downloadLink.download = baseName + '-no-admin.bat';
|
| 36 |
+
downloadLink.style.display = 'block';
|
| 37 |
+
downloadLink.textContent = 'Download ' + downloadLink.download;
|
| 38 |
+
});
|
| 39 |
+
</script>
|
| 40 |
+
</body>
|
| 41 |
+
</html>
|