Skip to main content
Share Your Experience: Take the 2024 Developer Survey
29 votes
Accepted

Is there a general purpose scripting language that I can expect to find on (almost) all Windows installations?

You don't need a general-purpose language if you can ship a compiled program – you're already writing a program in the first place; use the same method to write an Updater.exe alongside the main App....
grawity_u1686's user avatar
13 votes

Downloading Google Chrome using Powershell

With winget: winget install -e --id Google.Chrome It is a Windows package manager from Microsoft and part of the App Installer https://apps.microsoft.com/detail/9NBLGGH4NNS1 Install via Install-...
cachius's user avatar
  • 396
6 votes

Is there a general purpose scripting language that I can expect to find on (almost) all Windows installations?

A lot of scripting languages have a way to package them into a single-file binary executable. The usual strategy is to include a custom interpreter executable that loads scripts from itself (read ...
slebetman's user avatar
  • 712
4 votes

Downloading Google Chrome using Powershell

Without you telling us what is actually going wrong, giving you the right answer is going to be hard. Yes, I can name a few different ways on how to install Chrome, but I suspect the problem you're ...
LPChip's user avatar
  • 61.8k
3 votes

How can I run a bash script in zsh?

The literal tilde in your PATH is expanded by Bash, but not by Zsh. In general you shouldn't use ~ inside PATH. Use the full path. In an assignment tilde-prefixes can be used at the beginning of the ...
Kamil Maciorowski's user avatar
3 votes

SSH remote command with nohup not working as expected

The specification of nohup states [emphasis mine]: If standard input is associated with a terminal, the nohup utility may redirect standard input from an unspecified file. If the standard output is a ...
Kamil Maciorowski's user avatar
2 votes

Scripting connecting/disconnecting a paired Bluetooth device

The AutoHotkey script brought up by Pavel is most inspiring, yet compilation requires AutoHotkey. I ported the code to powershell, lest the code requires AutoHotkey: Param( [Parameter(...
dzmanto's user avatar
  • 121
2 votes

How to pass node parameters such as '--trace-deprecation' in npm scripts

Yes indeed—you can pass many node CLI flags as environment variables, which can be inlined in a scripts command. For example: "build": "NODE_OPTIONS='--trace-deprecation' webpack", ...
Mike Niebling's user avatar
2 votes

Is PHP actually ported to AmigaOS?

http://aminet.net/package/comm/www/thttpd2.21b_working_php A 4.x version, not the latest, but a PHP ;-) And there are some others; http://aminet.net/search?query=PHP
Hannu's user avatar
  • 9,399
2 votes

What is the equivalent of Linux's && for windows

What to add to make the script stop if cd rcA can't be executed? You use && in cmd as well: cd rcA && powershell "ls | where {$_.Length -lt 100gb} | Remove-Item -Force -Recurse&...
DavidPostill's user avatar
  • 158k
2 votes
Accepted

How to execute three terminal scripts in three new tabs from Applescript?

You can just send the key command to open a new tab, then direct your script to this new tab. You don't need to activate each time, once it's at the front. Here I've substituted echo hello so it's ...
Tetsujin's user avatar
  • 49.8k
2 votes
Accepted

mv in script eports "cannot stat"

When I copy and past from the output file, it works but mv reports "cannot stat" on the source file when it runs in the script. What you have in the output file is not the same as what you'...
grawity_u1686's user avatar
2 votes

How can I run a bash script in zsh?

You need not only to create the script, but also to make it executable. Then, when you run it, the #! line will instruct the system where to find an interpreter for the code. Worked example: cat >...
Chris Davies's user avatar
  • 3,974
1 vote

Is there a general purpose scripting language that I can expect to find on (almost) all Windows installations?

The closest things I could find on Windows were single-binary interpreters, and the ones I used were GNU Make and busybox-w32. Busybox's sh implementation was quite functional, reliable, and ...
user38983's user avatar
  • 467
1 vote

Windows stop all radios when you go to sleep / hybrid sleep / s3 sleep

I figured out one solution but it does not touch “Airplane Mode.” Would love a better solution. It involves using the net start and net stop (with /Y and admin) commands on the BthServ and WlanSvc. ...
Spectraljump's user avatar
1 vote

WinSCPSession error in parameter name 'HostName'. How it fix?

The parameters you are using should go to New-WinSCPSessionOption, not New-WinSCPSession. Like this: $sessionOption = New-WinSCPSessionOption -HostName $ftpServer -PortNumber $ftpPort -Credential (New-...
Martin Prikryl's user avatar
1 vote

SSH remote command with nohup not working as expected

nohup expecting no output to stdout and stderr to be able to run in background via ssh. in your case, here is the correct syntax: ssh user@host "nohup cmd > nohup.out 2>&1 &"
kholis's user avatar
  • 191
1 vote

Extract text between two strings from a file and save the output

...let us call it TextExtract to be called on the command line with the four parameters like this: > TextExtract.Script .\SomeFile.txt '\StartHere' '\EndHere' .\SomeFile.log This changes in syntax ...
Io-oI's user avatar
  • 8,242
1 vote

When using script for WinSCP it opens another folder

Error changing directory to 'C:\Users\darkovuj\Desktop'. This path comes somewhere from your GUI or profile settings. The error appears even before WinSCP tries to change the remote directory so does ...
dodrg's user avatar
  • 1,472
1 vote

Linux RHEL 7 - Shell Script - Can execute command separately but cannot execute inside a script

It's a permission problem with your group being "root". You'll have to sudo ./installScript.sh Or, you can sudo chown cust:cust ./installScript.sh and not need sudo to run. Also, you could ...
JayCravens's user avatar
1 vote
Accepted

Make GitHub navigation pane always visible using local JS/CSS such as GreaseMonkey

The left sidebar sort of doesn't load the data before clicking on the hamburger button, and I have no clue how the site works in general, but I made something a bit tacky. // ==UserScript== // @name ...
ryelin's user avatar
  • 76
1 vote

Scripting connecting/disconnecting a paired Bluetooth device

https://github.com/m2jean/ToothTray is a project implementing connection/disconnection with bluetooth audio devices. From its README.md: Instead of using Windows bluetooth API, Windows Core Audio API ...
Shun Feng's user avatar
1 vote

How to make an error message in a batch script if the target isn't present?

To print the windows system error message use (in commandline): net helpmsg %ERRORLEVEL%
MichelDG's user avatar
1 vote

How do I run a batch script at shutdown in Windows 10 home edition?

I've finally found out the solution after several months! Open the Group Policy Management Console. Then go to User Configuration\Policies\Windows Settings\Scripts (Logoff). Now add your app or ...
FLAMIN's user avatar
  • 31
1 vote

How can I access volume levels from the command line on Windows 7?

You can get Windows volume via Windows Core Audio API pEndpointVolume->GetMasterVolumeLevelScalar(&currentVolume); I've wrote a C++ program for it, you can use it directly from the command ...
WingTillDie's user avatar
1 vote

How can I get a script to run every day on Mac OS X?

For those who are already users of the (paid) software Keyboard Maestro, you can use its cron trigger to trigger a macro on a schedule. (I know this question is old, but the answers constitute such a ...
mhucka's user avatar
  • 242

Only top scored, non community-wiki answers of a minimum length are eligible