Skip to main content

New answers tagged

1 vote
Accepted

Automatically run powershell script as administrator

Put this code in your ps1 $ArgumentList = @' powercfg /setactive ab6534a3-bc02-4c44-94d1-a8535b2eb070 set-itemproperty -path 'HKLM:\SOFTWARE\Samsung\SamsungSettings\ModulePerformance' -name 'value' -...
Someone's user avatar
  • 221
0 votes

Running JavaScript in Microsoft Edge browser without installing a userscript manager like Tampermonkey

Is there a way to run JavaScript script on Microsoft edge without installing a userscript manager? Yes. Save your userscript as *.user.js Open edge://extensions Enable developer mode Either drag-and-...
JamesTheAwesomeDude's user avatar
0 votes

programmatically extract tar.gz in a single step (on windows with 7zip)

Some versions of the 7-Zip documentation (at least here) say that this is possible, where as some others (at least here) say that the required parameter -si is not supported with the extraction ...
pinjaliina's user avatar
0 votes

Determine if command is recognized in a batch file

You can use WHERE for this and specify the /Q parameter to suppress output and return only the exit code: WHERE /Q myCommand.exe IF ERRORLEVEL 1 ECHO myCommand.exe not found If you're including path ...
areyling's user avatar
  • 111
0 votes

How to launch a command on network connection/disconnection?

Some people in the comments wanted the script version of making a scheduled task that runs a command on network connection/disconnection. So I wrote one here in Powershell. To make PowerShell close ...
pangratt12345's user avatar
0 votes

Add directory to $PATH if it's not already there

I have these modifications to PATH in my .profile, so it's no good to use the [[ bash-ism. This does the same thing, but should be POSIXly correct: prepend_to_PATH () { local dir for dir ; do ...
Walf's user avatar
  • 459

Top 50 recent answers are included