You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-5Lines changed: 11 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
-
This vbscript will run powershell.exe hidden; since [`-WindowStyle Hidden` isn't sufficient](https://github.com/PowerShell/PowerShell/issues/3028). Hopefully we'll have [a `pwshw.exe` soon](https://github.com/PowerShell/PowerShell/issues/3028#issuecomment-367169480) and this repo can be antiquated.
1
+
This vbscript will run powershell.exe hidden; since [`-WindowStyle Hidden` isn't sufficient](https://github.com/PowerShell/PowerShell/issues/3028).
2
+
Hopefully we'll have [a `pwshw.exe` soon](https://github.com/PowerShell/PowerShell/issues/3028#issuecomment-367169480) and this repo can be antiquated.
2
3
3
4
You're probably here because you've already realized that using [PowerShell's `-WindowStyle Hidden` parameter](https://docs.microsoft.com/en-us/powershell/scripting/core-powershell/console/powershell.exe-command-line-help#parameters) without this script, doesn't completely hide the powershell console.
4
5
@@ -10,12 +11,13 @@ You're probably here because you've already realized that using [PowerShell's `-
I recommend that you also pass the `-WindowStyle Hidden` parameter, so that the executing powershell script knows that it's hidden.
20
+
You may also want to include the `-NonInteractive` parameter for the same reason.
19
21
20
22
If you have machines that have Windows Scripting Host (WSH) file extensions (like `.vbs`) disassociated from WSH; then you will need to add the `//E:vbscript` parameter:
Logging is done to *Event Viewer*. There will be two events for every run of the script. One at the start of the run, and the other at the completion/finish. The details of the logs are:
29
+
Logging is done to *Event Viewer*.
30
+
There will be two events for every run of the script. One at the start of the run, and the other at the completion/finish.
31
+
The details of the logs are:
28
32
29
33
-**Event Path:**`Windows Logs\Application`
30
34
-**Source:**`WSH`
@@ -35,7 +39,8 @@ Logging is done to *Event Viewer*. There will be two events for every run of the
35
39
36
40
## Start
37
41
38
-
The *Event ID* of the *starting* message will always be `4` (informational). Here's an example of what that will look like:
42
+
The *Event ID* of the *starting* message will always be `4` (informational).
43
+
Here's an example of what that will look like:
39
44
40
45
```
41
46
HiddenPowershell Running:
@@ -45,7 +50,8 @@ HiddenPowershell Running:
45
50
46
51
## Finish
47
52
48
-
The *Event ID* of the *finished* message will be `0` (success). If powershell exits with a non-zero exit code, the *Event ID* will be `1` (error).
53
+
The *Event ID* of the *finished* message will be `0` (success).
54
+
If powershell exits with a non-zero exit code, the *Event ID* will be `1` (error).
49
55
50
56
Here's an example of what a *success* looks like; *Event ID* is `0`:
0 commit comments