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:Jump to solution
Thread closed
Issue was with PATH, system needed to be restarted due to changes to PATH...
26 Replies
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
@Amadeo
This command works without admin privileges right?
Does hass.agent produce any kind of logs after the command is executed? (With extended logging)
Yep
Let me check again in a bit but I didn't see any after I tried earlier today
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
sorry, it's been a while, how do i do that again? 😅
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](https://cdn.answeroverflow.com/1255679884856918026/image.png)
![No description](https://cdn.answeroverflow.com/1255679885079220284/image.png)
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 defaultseems to just run in the same window
![No description](https://cdn.answeroverflow.com/1255693447546015754/image.png)
Someone on stack overflow used this for npm
start powershell {.\scriptInNewPSWindow.ps1}
I would try putting your command in the brackets againoh i didnt realize the brackets were part of it, my bad
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](https://cdn.answeroverflow.com/1255696843875160146/image.png)
does this "nighlight" work everywhere or there is specific folder?
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
low integrity is off right?
because the error you've captured basically says "I don't know what nightlight is"