batch file - How do I use bat script as Chrome Native Messaging Host? -


i know first response requirement minimal , writing script overkill. want run system command , send output extension.
here have tried

@echo off :strt :: code goto strt 

doesn't work. above code give me error message error when communicating native messaging host.

following example here

it turns out .bat doesn't fulfil requirements chrome native messaging host . requirement host simple , using either python or c++ much.i have opted powershell accomplish task.

here powershell version

try { $reader = new-object system.io.binaryreader([system.console]::openstandardinput()) $len = $reader.readint32() $buf = $reader.readbytes($len) $msg = [system.text.encoding]::utf8.getstring($buf)  $nets = convertfrom-csv (getmac /fo csv /v) .. .. .. # point. response @{mac = $mac} } 

answering own question , hoping in future.


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -