Created
April 2, 2019 09:26
-
-
Save IISResetMe/100f9778ce88bc827df777a469c0f28d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type ' | |
using System; | |
using System.Runtime.InteropServices; | |
public class advapi32 { | |
[DllImport("advapi32.dll", SetLastError=true, CharSet=CharSet.Auto)] | |
public static extern IntPtr CreateService( | |
IntPtr hSCManager, | |
string lpServiceName, | |
string lpDisplayName, | |
uint dwDesiredAccess, | |
uint dwServiceType, | |
uint dwStartType, | |
uint dwErrorControl, | |
string lpBinaryPathName, | |
string lpLoadOrderGroup, | |
string lpdwTagId, | |
string lpDependencies, | |
string lpServiceStartName, | |
string lpPassword); | |
} | |
' | |
# class [advapi32]::CreateService() here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment