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

Questions tagged [script]

An automated series of instructions carried out in a specific order, such as a Windows script created to launch a specific program on startup.

Filter by
Sorted by
Tagged with
0 votes
0 answers
41 views

Permission denied error when executing file or plugin

I'm trying to create a packer build as follows, and am getting permission denied. As I'm also seeing the same problem when trying to execute a shell script, I think the root cause may be an OS layer ...
Burvil's user avatar
  • 1
-1 votes
0 answers
37 views

How can I set a static IP in cmd/powershell/script for Windows when the adapter is a variable?

The question might be a little misleading, but the situation is this. I am constantly connecting to new devices (20+ daily) via a USB network adapter (actually a usb device cable which is recognized ...
Andrew Vincent's user avatar
0 votes
1 answer
81 views

Embed png images into html single one file in Powershell script

I am working on making a powershell script with a png file and an html file in it,is it possible to process these files in the PowerShell script or something similar so that I can eventually convert ...
DINU's user avatar
  • 1
0 votes
2 answers
100 views

How to Make Python CommandLine Loads Script Automatically When Opened?

Is possible a script to automatically loaded when python (Interactive Mode) is executed? I mean like the script in $Profile PowerShell, which when PowerShell executed, the script is automatically ...
Mr.Key7's user avatar
  • 745
-1 votes
0 answers
70 views

powershell login script hidden win11

I have a login .bat for a specific account that runs a vbs script that loads a dialog box. Works no problem on win11 I'm Concerned that vbs scripts might go obsolete so have rewritten the script in ...
LsAndy's user avatar
  • 1
0 votes
0 answers
15 views

Is there a way to automatically switch between two windows of the same app in Windows 10 [duplicate]

I have two windows of the same program that i am constantly switching over manually, (each window needs the whole screen). Is there a way to automate the process of switching between them for let's ...
Elk imad's user avatar
0 votes
2 answers
96 views

While Function - Loop on failure to match input password for new AD user creation script

I am creating a script with basic variables to create users in AD via PS7 rather than remoting in to AD and manually creating. It runs through several questions and then my script will run at the end ...
DeltaSun510's user avatar
0 votes
0 answers
102 views

how to use curl for single sign-on website or page

I've already written a shell script but it's not working. I'm getting an empty response whereas it should first return a token and also it should login then register the API. That's the task which my ...
DevOPs's user avatar
  • 1
0 votes
1 answer
26 views

Temporarily disabling hardware IO ports for remote connection

I'm using moonlight with sunshine to stream my desktop to my mobile devices for remote access. Is there a way for a script to toggle the all IO ports, except the ethernet, on and off to prevent direct ...
Forest Lam's user avatar
0 votes
1 answer
39 views

How can I tell in a script, which AzureAD domain a machine is joined to, and which groups it is in, locally on the machine?

I have existing PowerShell and VBScript scripts to tell me things like which AD domain and forest a machine is joined to, which OU it resides in, which site it considers itself to be in, etc. And I ...
Adam Thompson's user avatar
12 votes
6 answers
9k views

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

I'm deciding on the programming language I want to use for a simple script that will make a HTTP request checking for avaliable updates, download the update if avaliable and execute a program. On ...
Reverent Lapwing's user avatar
1 vote
0 answers
12 views

left hand keyboard toggle

I am designing code for a keyboard to be only used with left hand for a stroke patient in autohotkey. I need to use the space bar as a toggle button. So, when space bar is pushed it changes the output ...
Amy 's user avatar
  • 11
0 votes
1 answer
82 views

Prevent sending a specific key if I'm pressing other 2 or more keys

I have this mouse with additional forward and back buttons at the side and here's an AHK script that I use with it, It's main purpose is: If middle mouse button is scrolled up while holding down ...
ene adelehum's user avatar
1 vote
2 answers
186 views

Command Line to Open specific Outlook 365 Calendars

Questions: How can I open a specific outlook calendar via a command line? How do I find the values to use in the /select switch? Work already done: Using "c:\program files\microsoft office\...
psycoperl's user avatar
0 votes
0 answers
40 views

Automated dismounting & mounting of external hard drive

I have an external hard drive for my backups, but to better protect it against ransomware, I want to have a scheduled script after the backup finishes, that dismounts the drive, and then a similar one ...
pabaxe's user avatar
  • 1
0 votes
1 answer
100 views

AHK keywait for multiple keys (missing (SC) (VK))?

I got this function from here : https://www.reddit.com/r/AutoHotkey/comments/1arcp8q/comment/kr1km61/?context=3 It waits for one or multiple keys to be pressed, But It doesn't accept scan code (SC) or ...
yfjuu 0's user avatar
  • 23
0 votes
1 answer
41 views

how to change the format of the date time of windows from WSH

I want to use Windows Scripting Host to automate my windows instalation and I want from it to change the hour to 24h and the date to YYYY-MM-DD. Is it possible?
Remus Rigo's user avatar
  • 2,999
0 votes
1 answer
80 views

Linux/Ubuntu/Orange Pi5 retrieve open tabs on Chromium (kiosk mode) via terminal - Powershell

I have a problem as of late where I am developing some PowerShell script to manage and update some digital displays. Please see below for my work in progress (By no means done). I am struggling to be ...
M.Atkinson's user avatar
0 votes
0 answers
52 views

PuTTY script reading a list? [duplicate]

Is there a way in PuTTY to run a script that will read a file of names and then answer a prompt of yes (per name)? It is a Red Hat Linux backend server that I am connecting too. At times I can get a ...
johnism's user avatar
1 vote
1 answer
332 views

Writing a batch script to copy files based on date

I have a folder on a local PC that updates files through Dropbox. I have created a batch script that runs through a scheduler each day. So far it checks to see if a folder is empty (C:\TheGlenFTP\...
ChrisH's user avatar
  • 11
1 vote
1 answer
131 views

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

I am looking for an automatic way to prevent any Bluetooth and/or WiFi connections during certain times. E.g. while my PC is asleep. Because Microsoft in its infinite wisdom and user servitude, has ...
Spectraljump's user avatar
1 vote
1 answer
141 views

How to get the timestamp for the system lock/unlock of ubuntu 22.04 with the user's inactivity time? (Not login/logout.)

I want to get the user's lock & unlock timestamp in a single script or command, as in "last" command I can see the user's name with system's login & logout timestamp. How can I get ...
Mahesh Garole's user avatar
-2 votes
1 answer
63 views

Improve bat script

I'm try to improving this and make it looks better. I have two issues When I run as administrator the file that I need won't copy in the user profile (I just run as admin to run the .bat script. ...
Daniel Jiménez's user avatar
0 votes
0 answers
97 views

OC document with mixed mathematics and text

I have a document containing math-equations that I want to translate to another language using google translate. What I would have done if it was a text-document with images, is to use any ocr-...
Mikkel Rev's user avatar
0 votes
2 answers
81 views

Some image files are deleted during output/moving with batch file

I've been having an issue for a while now with various versions of a batch file script I have been using to assist with listing items on my WordPress/woocommerce page. The script seems to occasionally ...
MonkeyNoodles's user avatar
0 votes
1 answer
259 views

LDAP manipulation - Powershell or any other langage?

For a synchronization script, I need to connect to a LDAP (not an AD), search for few users then extract their usercertificate. As the rest of the script is already written in PowerShell, I thought it ...
el_grom's user avatar
0 votes
2 answers
854 views

How can I run a bash script in zsh?

I want to run a script written for bash in zsh. If I run which bash, I get /usr/bin/bash Following this answer I have created the following script #!/usr/bin/bash echo 'Hello' The file hello is in ...
Psionman's user avatar
  • 153
1 vote
1 answer
604 views

How do I set Task Scheduler to execute Windows Service at __:00/15/30/45 am/pm from start up?

To be more precise, this is a failsafe that I am trying to create for my windows service. For information, I need my windows service to extract data from a server at 15mins intervals everyday. E.g., ...
Wyap005's user avatar
  • 11
0 votes
1 answer
151 views

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

I created a script in WindowsPowerShell that sends files from the hard drive to an unsecured FTP server. However, I have an error problem that I don't know how to fix. I have Windows Powershell ...
user3435228's user avatar
0 votes
0 answers
173 views

Add buttons to Windows Explorer to automate tasks

Is there a way to add a custom button to the Windows Explorer GUI so I can automate some tasks in folders, eg. to automatically create a new subfolder with the current date as its name? The button ...
Val's user avatar
  • 131
0 votes
0 answers
44 views

How to skip an rm command without erroring out of the script [duplicate]

My SFTP script errors out if the target file in my "rm xxx" command doesn't exist. Sample script: OPEN sftp://pwd@host cd from_ar rm file1.edi -f rm file2.edi -f rm file3.edi -f rm file4....
JSS's user avatar
  • 1
1 vote
0 answers
82 views

How to select data between hex values from a file

Let my try and rephrase the question. Below is a sample of the file I have, pasted from a hex editor. 0000:0000 | 02 30 1C 31 32 33 1C 49 72 72 65 6C 65 76 61 6E | .0.123.Irrelevan 0000:0010 | 74 ...
Corvus Corax's user avatar
0 votes
0 answers
62 views

Is there an alternative way to install illustrator scripts on Windows?

I have a work computer that is controlled by an admin so I can't copy files into the program folder without calling them. I have tens of scripts to set up and copy into this folder which will require ...
Aasim Azam's user avatar
0 votes
0 answers
129 views

Switch screen being mirrored by command line

In my setup I have two monitors stacked vertically, and a TV, hooked up to my PC. The TV mirrors the top screen usually. I want to write a script (so that I can set a keybind) to switch the screen it ...
Precast Dragon's user avatar
4 votes
3 answers
9k views

Downloading Google Chrome using Powershell

Is it possible to download the latest version of Google Chrome using Powershell. I'm an IT Admin looking at putting a script together for our field techs. Since upgrading our client machines to ...
uberdude's user avatar
0 votes
1 answer
104 views

Find letter of the system drive of most recently attached VHD

There are scripts for finding letter of most recently attached VHD here and here. I use the following code to run from batch script: FOR /f usebackq %%a in (`powershell -c "GET-DISKIMAGE %...
qloq's user avatar
  • 135
2 votes
0 answers
242 views

How can I close a browser window from a bash script?

I would like to open and close windows from a bash script but in my two versions of the code it gets stuck when it opens the first window and does not close the current window and then open the new ...
Bambino 's user avatar
0 votes
0 answers
27 views

How do I install many lines of packages with apt (from a script)? Does '\' work? [duplicate]

A part of my Bash script looks like this: apt install -y alsa-base alsa-utils apt-transport-https build-essential curl ffmpeg geany gcc \ gnome-screenshot gnome-terminal libfuse2 libreoffice-calc ...
John Smith's user avatar
0 votes
1 answer
369 views

mv in script eports "cannot stat"

I'm trying to write a script that adds the last accessed time to the end of the basename. Here is the script: for f in *.doc; do DIR=$(pwd) FILENAME="$f" FILETYPE=${FILENAME##*.} ...
MSS's user avatar
  • 3
2 votes
0 answers
61 views

PowerShell output is saying no

I wrote this PowerShell script to read two big text file based on the following model: ID "Text", the script read both text file and is supposed to compare them and tell me if the line exist ...
Maslie's user avatar
  • 55
1 vote
0 answers
315 views

Creating a script for Windows 11 to gzip some files using 7-zip then move and replace them in another folder

I have the following directory structure: Parent Folder: Project Children of Project: data, rawData Inside of rawData I have: index.html, settings.html, user.html, script.js, style.css and other files....
George Florian's user avatar
3 votes
2 answers
353 views

SSH remote command with nohup not working as expected

I wanted to run a long running command in a remote server, even after the connection terminates. So I thought of using ssh host "nohup cmd &". But for some reason, neither cmd is going ...
Sourav Kannantha B's user avatar
1 vote
1 answer
224 views

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

I have the following apple script top execute three commands in different terminals. Is it possible to (1) combine this script to make it more efficient and (2) open in different terminal tabs instead ...
Brigadeiro's user avatar
3 votes
2 answers
3k views

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

How to extract the text between two strings from a file and save the output to another file, and invoke it in batch, at command line? To be more specific, let us say that the input file is SomeFile....
digital-Ink's user avatar
1 vote
1 answer
1k views

Powershell: Get-StoredCredential not working when script is run from task scheduler

I am writing a powershell script which shall periodically run to backup the contents of a remote folder. That remote folder is mapped as a WebDav share to my Windows drive G:\. This post and this one ...
Traveler's user avatar
  • 336
1 vote
1 answer
141 views

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

What is the equivalent of Linux's && for windows For example cd\ cd rcA powershell "ls | where {$_.Length -lt 100gb} | Remove-Item -Force -Recurse" What to add to make the script ...
God of Money's user avatar
1 vote
1 answer
118 views

When using script for WinSCP it opens another folder

I am trying to automate process of downloading files from SFTP server using WinSCP. But I am having issues with the execution of one part of the code. When the connection is established instead ...
Ivan Aksentijevic's user avatar
0 votes
0 answers
275 views

WINDOWS LOCK SCREEN: Unable to refresh via Commandline

I'm trying to publish a LockScreen company-wide and I was able to achieve it by applying the settings under the registry 'HKLM:\Software\Policies\Microsoft\Windows\Personalization' and it worked as ...
Nana's user avatar
  • 1
0 votes
0 answers
463 views

Autoconnect to UltraVNC machine using password in a script, but the hostname (VNC Server) is always empty

VNC Server Field I'm making an GUI using PowerShell with a listbox and in that listbox there are hostnames. When I select it and hit connect, it should connect to that machine without entering a ...
Sub's user avatar
  • 1
0 votes
1 answer
161 views

Double-clicking .sh file on KDE fails to run the script

I have a simple .sh script on my Desktop that fixes a minor annoyance with my second display. If I open Konsole, and type ./script.sh, it runs perfectly. But if I double click that .sh file - it fails ...
Adrian's user avatar
  • 1

1
2 3 4 5
55