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
633 views

How do I remove a app using its name with powershell?

I'm trying to write a script that can remove apps using the DisplayName from this piece of code Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object ...
Bottish's user avatar
  • 317
0 votes
1 answer
327 views

Windows 10 20H2 Powershell job not executing during deployment task sequence

My SOE builds have included a script to get rid of all but a few of the user based apps. The script has worked perfectly in all my builds up until Windows10 20H2. If I log into the workstation once ...
paul.sanders's user avatar
0 votes
1 answer
700 views

Run script on startup in W10 - version "20H2"

Uh-oh. I have an Autohotkey script which has always run on startup, for years. I have just updated my W10 OS from 1607 to "the latest", which appears to be called "20H2". Neither ...
mike rodent's user avatar
1 vote
1 answer
3k views

How to check a virtual machine free disk space and increase the size to a specified size using PowerShell script

I need help with a script to check if the free disk space is 30GB and if it is less than 30GB, increase it to just the difference to make the free space 30. I need this to work for 1500 VM's so it ...
webby68's user avatar
  • 259
0 votes
0 answers
353 views

Launch Multiple Instances of Shell scripts in Parallel

I have a parent folder which contains a script mytestcase.sh Parent_folder/mytestcase.sh I would like to launch 5 terminal instances to run mytestcase.sh from 5 different terminals at the same time ...
ramuloramula's user avatar
1 vote
1 answer
510 views

Windows Admin Center (WAC) + Powershell

so I'm using a PowerShell script which runs .exe installation, both the script and the .exe file located in the same network folder, when I run the script directly from the pc it runs well, but when I'...
amit_m's user avatar
  • 11
0 votes
0 answers
26 views

Script to find out which disk a nearby (LAN) Mac computer is booted off?

I have a headless Mac (OS X 10.13.6) on my LAN which sometimes reboots, and when it does, it occasionally boots off the wrong internal disk. I want to be able to check periodically, from my other ...
Mike Levin's user avatar
0 votes
1 answer
2k views

Intune Win32 app batch script installation can't run as user

TL:DR When trying to install and run a .bat script file via intune Win32 app the install behavior is stuck on SYSTEM and greyed out, but the batch script requires to be run as current logged in user. ...
markaabo's user avatar
1 vote
1 answer
821 views

Powershell; Delete users from computer by Get-LocalGroupMember

I'm trying to delete all users from the Group Users from the computer except the NT Authority accounts. I want to get the list of users from the Group Users, and use that list to delete the profiles ...
Jordi van Deerse's user avatar
0 votes
1 answer
1k views

Adding computer's description to BGInfo

Is it possible to add the computer description value to BGInfo? The closest information I've found so far is the <Host Name> (available in the defaults field) but I guess I would have to write a ...
SimonBesner's user avatar
1 vote
1 answer
614 views

(net was unexpected at this time

I am trying to write batch file to map drive when needed but whenever I run it I get an error: (net was unexpected at this time @echo off SET /P Site=Which site you want to map please type SITE ...
Syed  Asad Haider's user avatar
1 vote
1 answer
166 views

Use OR with condition in AutoHotkey script

I created the following AHK script to answer my own question here: NumpadEnter:: Process, Exist, httpd.exe If ErrorLevel = 0 { Run, C:\XAMPP\apache_start.bat,,Hide Run, C:\XAMPP\...
Hashim Aziz's user avatar
  • 12.8k
1 vote
1 answer
621 views

Make AutoHotKey's Edit This Script open scripts in Sublime Text 3

For years I've been using AutoHotKey to automate a few common tasks on my system using hotkeys. By default clicking Edit This Script on a running script (from the Windows system tray) opens Notepad. ...
Hashim Aziz's user avatar
  • 12.8k
0 votes
0 answers
26 views

How to check if variable is empty [duplicate]

I've made a script to execute rsync only when $VAR (part of a file path) has some content and in case it's empty the script will stop and return error 1. This is the command: test -n $VAR && ...
naio's user avatar
  • 133
0 votes
2 answers
2k views

Powershell script to remove files older the X days, keep getting prompted to confirm for child files

The script below I found and tried to use this to automatically monitor a folder en delete files older then 2 days. The problem I experience is that I'm prompted with "The item at G:\test\XXX has ...
user3032387's user avatar
1 vote
0 answers
898 views

How to place continuous numbering on PDF?

I want to place continuous numbering on a pdf document 1.5cm from the page edge. The numbering should run from the top to bottom of every page. This is similar to line numbering, however the ...
tommydog35's user avatar
1 vote
1 answer
47 views

start /wait doesn't wait. How to workaround without using pause in script (Script is meant to be unattended)

I have a script that is run after windows is installed and performs a vast number of tasks, including installation of drivers and various programs. The intent is that the script is run unattended. I ...
user avatar
0 votes
1 answer
1k views

move hard-drive from /dev/sdb1 to /dev/sdc1

During a backup procedure in a bash script, I should remount a hard-drive mounted on dev/sdb1 onto dev/sdc1. I am able to umount /dev/sdb1, but then I loose track of the device. After shutting down ...
Marcel Sonderegger's user avatar
2 votes
0 answers
2k views

Using Powershell to turn on/off the bluetooth: script doesn't work

I'm want to switch on/off Bluetooth using a shortcut. So I found this script here. But my problem is that it doesn't work for me. In fact, it seems to do nothing. I tried to run the script without ...
Gourbish's user avatar
3 votes
2 answers
245 views

Reset a network connection by name?

I quite often need to reset "Ethernet" connection as shown above. Currently I disable then enable it from the control panel but I wonder if I can create a script that I can simply double-...
Mr. Boy's user avatar
  • 5,256
6 votes
1 answer
751 views

On Windows, how to make a .bat or .ps1 file automatically elevate itself when running?

I have pinned admin cmd and admin pwsh to taskbar, I know how to run .bat files as Administrator, just right-click->"Run as administrator", for .ps1 files, I have modified openwith of ....
Ξένη Γήινος's user avatar
0 votes
1 answer
256 views

EXIFTOOL set MP4 to earliest date recursive - Can it be done?

I've been wrangling nearly 40TBs of videos that were recovered from 2 crashed RAIDs. Nearly all files have correct EncodeDate, TrackCreateDate and/or MediaCreateDate, but I'm biff'd on a mass rename ...
Jason Paul Michaels's user avatar
0 votes
1 answer
101 views

How to open multiple folders at once on spcific position without any program

How I can open multiple folders at once on a specific position without any program. Maybe using some script or something. I can't install a program like Window Manager or something See here what I ...
Adam's user avatar
  • 1
1 vote
1 answer
446 views

How do I extract a portion of a sentence in a list of sentences to a separate file and then replace a portion of the original sentences in notepad++?

I have a list of sentences in a text file and I would like to extract the part between |SENTENCE| and|TRANSLATION| to a list in a separate text file (I placed a bold and as a placeholder for what I ...
fando32's user avatar
  • 13
2 votes
0 answers
981 views

Extract all rar files in a folder and subfolders using 7zip [closed]

I have the following folder structure in Windows: D:\TV Shows | \----Show | | | \----S01 | | | | | \----E01 | | | | | | | \----E01.rar (contains E01.mkv) | | ...
Sean Sadoun's user avatar
0 votes
1 answer
364 views

Renaming pdf files to include the parentfolder name as the prefix, and including a unique suffix

Please can you help. How can I rename pdf files to include the parentfolder name as the prefix, and adding DRAFT as a suffix? For example, for parent folder name \ABCDEF: xyc123.pdf fgh456.pdf I ...
Lamington2m2's user avatar
0 votes
1 answer
128 views

Transpose vertically with a catch

I've been working through some issues preparing data for logstash ingestion. I have a decent chunk of the process worked out but I'm wondering if there's a better way to do this. Basically I need to ...
Steve Zemlicka's user avatar
0 votes
0 answers
290 views

Script sort MP4 (and other) videos by orientation to portrait and landscape folders >>> IMPOSSIBLE?

I've been wrestling with a 14TB+ video library for the last months trying to dedupe and sort all of it into production ready folder structure. For the life of me I have not been able to find (spent 3 ...
Jason Paul Michaels's user avatar
1 vote
2 answers
2k views

How to read last character of file through Batch Script and update the last character in a file

I have a very huge file in json format where each record end with "}}}," and same goes till last record where the last record comes like "}}}, " which has "comma(,)" and ...
Rohit Shamdasani's user avatar
0 votes
1 answer
322 views

how to give a variable value is empty in bash scripting

I'm trying to export 2 dashbords into two different files, Here in the loop 1st dashboard id is reading and value is storing {ES_HOST1}, then the {ES_HOST1} coming into empty, then in the loop 2nd ...
Gnturu Padmavathi's user avatar
0 votes
1 answer
864 views

Run Script At Shutdown but not Reboot (Windows)

I'd like to run a script to turn off my monitor when my PC is shutdown, but only when properly shutting down and not rebooting. Obviously if I'm rebooting, I want the screen to stay on! I know you can ...
Dutchmanjonny's user avatar
0 votes
1 answer
51 views

How would I modify this script to convert all files recursively?

#!/bin/bash #convert for image in *.png; do convert "$image" "${image%.png}.jpg" echo “image $image converted to ${image%.png}.jpg ” done exit 0 I'm a Python ...
Alexander Soare's user avatar
0 votes
0 answers
64 views

When script carries common strings from rows, lines are truncated

I have this script BEGIN { OFS=FS=";" } ARGIND == 1 { map[$2] = ($2 in map ? map[$2] OFS : "") $1 next } { r = $0; for (i=1; i<=NF; ++i) if ($i in map) ...
Jack's user avatar
  • 67
0 votes
2 answers
81 views

Find files that i added to an bootable USB

I used ISO Master to add a file to an Arch Linux installation .iso. But i can't find it. Where can i find the .sh file i added when i boot the .iso say on a VM? I have read many tutorials about making ...
Paul Schuldesz's user avatar
2 votes
1 answer
259 views

A text file list for each archive with relative name

To get a list of files inside a .rar archive I can use this batch @(for /R "%UserProfile%\Desktop\test winrar" %%I in (*.rar) do @"%ProgramFiles%\WinRAR\UnRAR.exe" lb "%%I&...
Jack's user avatar
  • 67
2 votes
2 answers
3k views

How to make Google chrome the standard browser every time i boot my pc

I was wondering if anyone knows how to make google chrome the standard browser every time i boot. This is for a school pc bc the kids change the default browser a lot. Maybe someone knows how to make ...
Bossie's user avatar
  • 21
0 votes
0 answers
483 views

Run a script with a different user credentials implemented

I have a VBS script that create folders and subfolders. dim filesys, newfolder, newfolderpath, number, address number=inputbox("Please enter the request number to create","Request ...
Alain's user avatar
  • 1
1 vote
1 answer
2k views

how to terminate ahk script after another app is finished

I have a simple AHK script I use to launch Google Chrome and also remap 2 keys to help me navigate my browser more easily. The script has 2 functions: Launch Chrome sets the navigation shortcut keys (...
Kalamalka Kid's user avatar
0 votes
2 answers
558 views

How do I configure AutoHotKey to use mouse for shortcut?

I am trying to create a script that will change desktops based on the following: When I hold down the right mouse button (i.e right click) and then use the scroll wheel. Scrolling up should go to left ...
Nura's user avatar
  • 107
0 votes
1 answer
133 views

Script to open a PDF with an in-document link in new tab in Adobe Acrobat

I need to open PDFs from another pdf document in new tab. I found this solution and it's working like charm: a) in the Document-level script: var myOpenInPlaceSetting = app.openInPlace ; app....
daani's user avatar
  • 3
0 votes
0 answers
369 views

How can I update the date of a renamed folder in batch?

The problem is when I start the script it will copy the folder and rename it and add the current date and time to the name. But while the script is running and changes in the folder were made it would ...
Batchdude's user avatar
0 votes
1 answer
393 views

How to fix a messed Excel sheet and make a proper format?

I have a problem in a specific sheet: I need only country,network,NetworkName and currency columns, but in sheet all messed up. As you can see in network Colum there are name and MCCMNC code also same ...
Mehrez Kanzari's user avatar
0 votes
1 answer
218 views

SSMS - executing two ALTER table statements concurrently for same table

Are there known issues with executing two ALTER table scripts for the same table? Both scripts alter the datatype for one (but different) column in a table? I'm wondering if one script finishing and ...
Curious's user avatar
0 votes
1 answer
291 views

How to use a Fingerprint Sensor to Login to windows programs that ask for a username and password?

There are Windows programs that ask for a username and password but don't allow alternatives like Fingerprint login. In my specific case, i have a POS (Point of Sales) that needs to be used by ...
sirtet's user avatar
  • 29
1 vote
2 answers
182 views

Batch File That Keeps Other Batch Files Running

I run 3 .bat files on my computer at all times 24/7 for a business that I have. Every now and then they will close because of my internet drops due to the area I live in and they need internet to run. ...
Tevin Mosley's user avatar
1 vote
1 answer
225 views

Proxy not working after setting from an automatic script

I set a proxy using a power shell script and it is showing fine in internet options however when I am opening the browser the proxy is not set. I even checked the registry to see the current proxy ...
badarsyed's user avatar
1 vote
2 answers
880 views

Bash script to rename PDF files based on filename [closed]

I want to write a bash script to periodically rename incoming PDF publications. When the PDFs are downloaded they have filenames in the following format : <Pub.Name>-<Day>.<Spelled ...
xthursdayx's user avatar
1 vote
1 answer
605 views

Watch for process start, then execute command

Short of hacking together a service to monitor process launches, is there any other way I can go about attaching code, or executing a command/process to an event handler for another specific process ...
paddywan's user avatar
  • 342
1 vote
0 answers
646 views

Advanced find and replace text in photoshop

In photoshop, let's say I have a few texts layers with contents like this: Text layer 1: 1@@text01@@abc Text layer 2: 2@@text02@@cef Text layer 3: 3@@text03@@hgi I would like to replace all the ...
Ryan Yeung's user avatar
0 votes
2 answers
248 views

Execute script when other app is calling for a "registered file type" (like .mp4)

I'm experimenting on Windows 7 and need little assistance. I've got an app that's listing my duplicates, it's the best I've found. BUT it doesn't show the filenames, only the option to "remove&...
JoBe's user avatar
  • 103

1
6 7
8
9 10
55