Skip to content

Instantly share code, notes, and snippets.

@TheWover
Forked from nicholasmckinney/regfreeCom.ps1
Created February 19, 2019 19:34
Show Gist options
  • Save TheWover/b84b1b94cf1c7f200be631d3d1abddcd to your computer and use it in GitHub Desktop.
Save TheWover/b84b1b94cf1c7f200be631d3d1abddcd to your computer and use it in GitHub Desktop.
Registration-Free Com Object from URL
# Make Sure dynwrapx,dll is in %temp%
$a = new-object -com Microsoft.Windows.ActCtx
$a.ManifestURL = 'https://gist.githubusercontent.com/subTee/36df32293bc5006148bb6b03b5c4b2c1/raw/661b5aafd55288930761d9ad4eabe7403146ab5c/dynwrapx.dll.manifest'
$b = $a.CreateObject("DynamicWrapperX")
$b.Register("user32.dll", "MessageBoxW", "i=hwwu", "r=l") | Out-Null
$b.MessageBoxW(0, "Hello, world!", "Test", 4) | Out-Null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment