Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit f250363

Browse files
authored
Merge pull request #78 from KnifMelti/main
Update README.md
2 parents cffc13d + 13f2c55 commit f250363

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ Just put the script with the **AppID** followed by the suffix to be considered i
5555
> Runs during uninstall (before uninstall check): `AppID-uninstall.ps1`
5656
> Runs after uninstall has been confirmed: `AppID-uninstalled.ps1`
5757
58-
If you're using [**WAU** (Winget-AutoUpdate)](https://github.com/Romanitho/Winget-AutoUpdate) they get copied to the **WAU mods** directory (except `-installed-once.ps1` and `-uninstall.ps1`) and also runs when upgrading apps in **WAU**.
58+
If you're using [**WAU** (Winget-AutoUpdate)](https://github.com/Romanitho/Winget-AutoUpdate) they get copied to the **WAU mods** directory (except `-installed-once.ps1/-preuninstall.ps1/-uninstall.ps1/-uninstalled.ps1`) and also runs when upgrading apps in **WAU**.
5959

60-
`AppID-installed-once.ps1` runs instead of `AppID-installed.ps1` from **Winget-Install** and doesn't get copied to the **WAU mods** directory.
60+
`AppID-installed-once.ps1` runs instead of `AppID-installed.ps1` from **Winget-Install**.
6161

6262
They are deleted from **WAU** on an uninstall (if deployed from **Winget-Install**)
6363

mods/_AppID-template.ps1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<# ARRAYS/VARIABLES #>
22
#App to Run (as SYSTEM)
3-
#$RunWait = $False if it shouldn't be waited for completion
3+
#$RunWait = $False if it shouldn't be waited for completion. Example:
4+
#$RunSystem = "$PSScriptRoot\bins\MsiZap.exe"
5+
#$RunSwitch = "tw! {GUID}"
46
$RunSystem = ""
57
$RunSwitch = ""
68
$RunWait = $True

mods/_Mods-Functions.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,20 @@ function Remove-ModsLnk ($Lnk) {
162162
}
163163

164164
function Add-ModsReg ($AddKey, $AddValue, $AddTypeData, $AddType) {
165-
if (!Test-Path "$AddKey") {
165+
if ($AddKey -like "HKEY_LOCAL_MACHINE*") {
166+
$AddKey = $AddKey.replace("HKEY_LOCAL_MACHINE","HKLM:")
167+
}
168+
if (!(Test-Path "$AddKey")) {
166169
New-Item $AddKey -Force -ErrorAction SilentlyContinue | Out-Null
167170
}
168171
New-ItemProperty $AddKey -Name $AddValue -Value $AddTypeData -PropertyType $AddType -Force | Out-Null
169172
Return
170173
}
171174

172175
function Remove-ModsReg ($DelKey, $DelValue) {
176+
if ($DelKey -like "HKEY_LOCAL_MACHINE*") {
177+
$DelKey = $DelKey.replace("HKEY_LOCAL_MACHINE","HKLM:")
178+
}
173179
if (Test-Path "$DelKey") {
174180
if (!$DelValue) {
175181
Remove-Item $DelKey -Recurse -Force -ErrorAction SilentlyContinue | Out-Null

mods/bins/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
A Directory for placing useful **bins** (**MsiZap.exe** as a really good example) for running via the **Template Function** (https://support.microfocus.com/kb/doc.php?id=7023386):
2+
3+
#$RunWait = $False if it shouldn't be waited for completion. Example:
4+
#$RunSystem = "$PSScriptRoot\bins\MsiZap.exe"
5+
#$RunSwitch = "tw! `{GUID}`"
6+
$Run = ""
7+
$RunSwitch = ""
8+
$RunWait = $True

0 commit comments

Comments
 (0)