#Windows #powershell #code https://gist.github.com/Trumeet/5b36d7af84c73160f110b27d4e759db0 草,还能这么玩(shell 调用 extern 啊,
Add-Type -MemberDefinition
C# 代码)$ShellAbout = @'
[DllImport("Shell32.dll")]
public static extern int ShellAbout(IntPtr hwnd, string szApp, string szOtherStuff, IntPtr hIcon);
'@
$Shell32 = Add-Type -MemberDefinition $ShellAbout -Name 'Shell32' -Namespace 'Shell32' -PassThru
$Shell32::ShellAbout(0, "Windows", "", 0);
Gist
Maybe a winver.exe replacement? (DEMO)
Maybe a winver.exe replacement? (DEMO). GitHub Gist: instantly share code, notes, and snippets.