Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog/67982.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Use a Jscript Custom Action to stop the salt-minion service on Windows instead
of a VBscript Custom Action due to future deprecation and security issues
11 changes: 7 additions & 4 deletions pkg/windows/msi/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,13 @@ IMCAC - Immediate Custom Action - It's immediate
Another application has exclusive access to the file \salt\var\log\salt\minion
Please shut down the application
-->
<CustomAction Id="stopSalt" Script="vbscript">
On error resume next
Set objShell = CreateObject("WScript.Shell")
objShell.Run "net stop salt-minion", 0, true
<CustomAction Id="stopSalt" Script="jscript">
try {
var objShell = new ActiveXObject("WScript.Shell");
objShell.Run("net stop salt-minion", 0, true);
} catch (e) {
// Handle error if needed
}
</CustomAction>

<!-- This is the import statement for the Custom Actions:
Expand Down
Loading