command run through powershell not working

i'm trying to run a simple command from here: https://github.com/nathanbabcock/nightlight-cli . i installed it as nodejs, but it seems to run through command line or powershell just fine, but when i try to input the command same as I would there, it doesnt work. i've searched around for a while and haven't been able to figure out anyway to make commands from this work. help figuring this out would be super appreciated
GitHub
GitHub - nathanbabcock/nightlight-cli: Control Windows 10/11's Nigh...
Control Windows 10/11's Night Light feature programmatically 🌓 - nathanbabcock/nightlight-cli
Solution:
Thread closed Issue was with PATH, system needed to be restarted due to changes to PATH...
Jump to solution
26 Replies
Ellie/jack5mikemotown
Ellie/jack5mikemotown•3mo ago
for the record regular powershell commands seems to run fine, its something with the specific setup here, probably to do with it being nodejs if i had to guess
DrR0x
DrR0x•3mo ago
@Amadeo This command works without admin privileges right?
Amadeo
Amadeo•3mo ago
Does hass.agent produce any kind of logs after the command is executed? (With extended logging)
Ellie/jack5mikemotown
Ellie/jack5mikemotown•3mo ago
Yep Let me check again in a bit but I didn't see any after I tried earlier today
DrR0x
DrR0x•3mo ago
You could try invoking a shell to run the command and enable the flag to keep it open, might provide info on why it is/isn't working
Ellie/jack5mikemotown
Ellie/jack5mikemotown•3mo ago
sorry, it's been a while, how do i do that again? 😅
Ellie/jack5mikemotown
Ellie/jack5mikemotown•3mo ago
actually, am i doing smth wrong here? i was trying to use mqtt to test instead of constantly storing new commands, but this test command does nothing. if i put the command in the "command or script" box instead of sending it as an mqtt payload, it works fine
No description
No description
DrR0x
DrR0x•3mo ago
powershell -Command {your command here} -NoExit Test that in a normal PowerShell and then test it in Hass.agent It should spawn a new window and run command, U may need to specify normal window style if it is hidden by default
Ellie/jack5mikemotown
Ellie/jack5mikemotown•3mo ago
seems to just run in the same window
No description
DrR0x
DrR0x•3mo ago
Someone on stack overflow used this for npm start powershell {.\scriptInNewPSWindow.ps1} I would try putting your command in the brackets again
Ellie/jack5mikemotown
Ellie/jack5mikemotown•3mo ago
oh i didnt realize the brackets were part of it, my bad
Ellie/jack5mikemotown
Ellie/jack5mikemotown•3mo ago
so works fine in powershell but not through hass agent.-NoExit didnt seem to work here but I managed to just record and screenshot the error
No description
Amadeo
Amadeo•3mo ago
does this "nighlight" work everywhere or there is specific folder?
Ellie/jack5mikemotown
Ellie/jack5mikemotown•3mo ago
Everywhere I've tried so far. Changing the current directory doesn't affect it, and I can just open PowerShell or command prompt and execute it the one command
Amadeo
Amadeo•3mo ago
low integrity is off right? because the error you've captured basically says "I don't know what nightlight is"
Want results from more Discord servers?
Add your server