Arlodotexe / windows-interact

An npm library of utilities for interacting with and automating Windows
24 stars 3 forks source link

`Win.get.audioDevices.output.transmitting` doesn't work #10

Open OddMorning opened 4 years ago

OddMorning commented 4 years ago

It throws a powershell error:

Cannot find path 'D:\11\PowerShellScripts\AudioDetection.ps1' because it does not exist.

I tried to change this part of the code: https://github.com/Arlodotexe/windows-interact/blob/06690030d9894f660c36f3330c9a5d8fc7cdb342/windows-interact.js#L1214 to

Win.PowerShell([`Unblock-File -Path "${__dirname}\\PowerShellScripts\\AudioDetection.ps1"`, `${__dirname}\\PowerShellScripts\\AudioDetection.ps1 input`], result => {

but it throws a new error so I'm not sure what's the problem:

Error: D:\11\node_modules\windows-interact\PowerShellScripts\AudioDetection.ps1 : File
D:\11\node_modules\windows-interact\PowerShellScripts\AudioDetection.ps1 cannot be loaded
because running scripts is disabled on this system.