Skip to content

Commit 093de6a

Browse files
twangboydwoz
authored andcommitted
Use jscript instead of vscript
1 parent 77cccb9 commit 093de6a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pkg/windows/msi/Product.wxs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,13 @@ IMCAC - Immediate Custom Action - It's immediate
148148
Another application has exclusive access to the file \salt\var\log\salt\minion
149149
Please shut down the application
150150
-->
151-
<CustomAction Id="stopSalt" Script="vbscript">
152-
On error resume next
153-
Set objShell = CreateObject("WScript.Shell")
154-
objShell.Run "net stop salt-minion", 0, true
151+
<CustomAction Id="stopSalt" Script="jscript">
152+
try {
153+
var objShell = new ActiveXObject("WScript.Shell");
154+
objShell.Run("net stop salt-minion", 0, true);
155+
} catch (e) {
156+
// Handle error if needed
157+
}
155158
</CustomAction>
156159

157160
<!-- This is the import statement for the Custom Actions:

0 commit comments

Comments
 (0)