Skip to content

Commit 082d920

Browse files
committed
[PE Helper/AutoRun] New Autorun application
1 parent 8954b4d commit 082d920

30 files changed

+1616
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,3 +404,4 @@ FodyWeavers.xsd
404404
# JetBrains software
405405
.idea/
406406
Helpers/extps1/PE_Helper/tools/HotInstall/out
407+
Helpers/extps1/PE_Helper/tools/PEHelperMainMenu/Tests

DISMTools.sln

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "DT_ThemeDesigner", "Tools\D
2626
EndProject
2727
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "HotInstall", "Helpers\extps1\PE_Helper\tools\HotInstall\Installer\HotInstall.vbproj", "{1A6D20C4-4CF3-478F-A292-21A90B64C1B6}"
2828
EndProject
29+
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "PEHelperMainMenu", "Helpers\extps1\PE_Helper\tools\PEHelperMainMenu\PEHelperMainMenu.vbproj", "{AA1BE743-8846-4B70-BFE0-C10F355563D3}"
30+
EndProject
2931
Global
3032
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3133
Debug|Any CPU = Debug|Any CPU
@@ -194,17 +196,36 @@ Global
194196
{1A6D20C4-4CF3-478F-A292-21A90B64C1B6}.Release|Win32.ActiveCfg = Release|Any CPU
195197
{1A6D20C4-4CF3-478F-A292-21A90B64C1B6}.Release|x64.ActiveCfg = Release|Any CPU
196198
{1A6D20C4-4CF3-478F-A292-21A90B64C1B6}.Release|x86.ActiveCfg = Release|Any CPU
199+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
200+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
201+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Debug|ARM64.ActiveCfg = Debug|Any CPU
202+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Debug|ARM64EC.ActiveCfg = Debug|Any CPU
203+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
204+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
205+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Debug|Win32.ActiveCfg = Debug|Any CPU
206+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Debug|x64.ActiveCfg = Debug|Any CPU
207+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Debug|x86.ActiveCfg = Debug|Any CPU
208+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
209+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Release|Any CPU.Build.0 = Release|Any CPU
210+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Release|ARM64.ActiveCfg = Release|Any CPU
211+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Release|ARM64EC.ActiveCfg = Release|Any CPU
212+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
213+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Release|Mixed Platforms.Build.0 = Release|Any CPU
214+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Release|Win32.ActiveCfg = Release|Any CPU
215+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Release|x64.ActiveCfg = Release|Any CPU
216+
{AA1BE743-8846-4B70-BFE0-C10F355563D3}.Release|x86.ActiveCfg = Release|Any CPU
197217
EndGlobalSection
198218
GlobalSection(SolutionProperties) = preSolution
199219
HideSolutionNode = FALSE
200220
EndGlobalSection
201221
GlobalSection(NestedProjects) = preSolution
202222
{042ED465-C910-407A-93D1-736639FF0EA5} = {89AEA3D0-02A9-44BA-83FB-DE1867902FD1}
203-
{5330BC3F-1BFF-4200-8872-3A2236F814AB} = {577F2635-34B0-4E7E-9CEB-4680D2F0E09D}
204-
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092} = {73D2865D-C927-423D-AF86-DD905DC747D5}
205223
{9DFE351C-3964-4DC0-BAAF-9307A4B697AF} = {577F2635-34B0-4E7E-9CEB-4680D2F0E09D}
224+
{5330BC3F-1BFF-4200-8872-3A2236F814AB} = {577F2635-34B0-4E7E-9CEB-4680D2F0E09D}
206225
{6F4EED7E-FA26-423F-8263-78B4DD6B0F8F} = {577F2635-34B0-4E7E-9CEB-4680D2F0E09D}
207226
{1A6D20C4-4CF3-478F-A292-21A90B64C1B6} = {577F2635-34B0-4E7E-9CEB-4680D2F0E09D}
227+
{AA1BE743-8846-4B70-BFE0-C10F355563D3} = {577F2635-34B0-4E7E-9CEB-4680D2F0E09D}
228+
{ADFA0CB4-E66F-4956-937E-1B2C4AAF3092} = {73D2865D-C927-423D-AF86-DD905DC747D5}
208229
EndGlobalSection
209230
GlobalSection(ExtensibilityGlobals) = postSolution
210231
SolutionGuid = {6178AAAF-4196-4AA9-B4BD-761B42B01FB8}

DISMTools.vbproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,6 +1973,11 @@ IF EXIST "$(SolutionDir)Tools\DT_ThemeDesigner\out\*.exe" (
19731973
del "Tools\ThemeDesigner\*.zip" /F /S /Q
19741974
)
19751975

1976+
:: Copy PE Helper Main Menu
1977+
IF EXIST "$(SolutionDir)Helpers\extps1\PE_Helper\tools\PEHelperMainMenu\out\*.exe" (
1978+
xcopy "$(SolutionDir)Helpers\extps1\PE_Helper\tools\PEHelperMainMenu\out\*.*" "bin\extps1\PE_Helper\tools\MainMenu" /CEHYI
1979+
)
1980+
19761981
:: Copy Tour
19771982
IF EXIST "$(SolutionDir)tour" (
19781983
xcopy "$(SolutionDir)tour\*.*" "$(TargetDir)docs\tour" /cehyi

Helpers/extps1/PE_Helper/PE_Helper.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,10 @@ function Start-PEGeneration
256256
Write-Host "HotInstall could not be copied."
257257
}
258258
}
259+
if (Test-Path -Path "$((Get-Location).Path)\tools\MainMenu") {
260+
Write-Host "The main menu has been detected. Adding to ISO file..."
261+
Copy-Item -Path "$((Get-Location).Path)\tools\MainMenu\*.*" -Destination "$((Get-Location).Path)\ISOTEMP\media" -Force -Recurse -Verbose
262+
}
259263
Write-Host "The ISO file structure has been successfully created. DISMTools will continue creating the ISO file automatically after 5 seconds."
260264
Start-Sleep -Seconds 5
261265
Write-Host "Creating ISO file..."
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
5+
</startup>
6+
</configuration>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Imports System.Diagnostics
2+
Imports System.IO
3+
4+
Module ProcessHelper
5+
6+
Function RunProcess(FilePath As String, Optional Arguments As String = "", Optional RunAsAdmin As Boolean = False) As Integer
7+
Dim exitCode As Integer = 0
8+
Try
9+
Dim proc As New Process() With {
10+
.StartInfo = New ProcessStartInfo() With {
11+
.FileName = FilePath,
12+
.Arguments = Arguments,
13+
.WorkingDirectory = Path.GetDirectoryName(FilePath),
14+
.CreateNoWindow = True,
15+
.Verb = If(RunAsAdmin, "runas", "")
16+
}
17+
}
18+
proc.Start()
19+
proc.WaitForExit()
20+
exitCode = proc.ExitCode
21+
Catch ex As Exception
22+
exitCode = ex.HResult
23+
End Try
24+
Return exitCode
25+
End Function
26+
27+
End Module

0 commit comments

Comments
 (0)