Skip to content

Instantly share code, notes, and snippets.

View ThioJoe's full-sized avatar

ThioJoe

View GitHub Profile
@ThioJoe
ThioJoe / !AddCompressToMenu -- How-To-Use.txt
Last active November 21, 2024 00:37
Add "Compress To" Option to Old Windows 11 Start Menu - Registry Tweak
How To Use:
1. Choose which version you want to use:
- "Full Menu" Version: The same as the original one in the new context menu, and has multiple sub-menu items
- Other Version: Doesn't have a sub-menu, it just directly opens the "Create Archive" menu. (The equivalent of clicking the "Additional Options" sub-item in the original)
2. Double click the "Add_" reg file of whichever version you choose
3. Restart Windows Explorer
- You can restart it by opening Task Manager with Ctrl+Shift+Esc, then search it for "Windows Explorer", right click that and hit "Restart"
@ThioJoe
ThioJoe / CombineTextFiles.ps1
Created September 9, 2024 17:48
PowerShell Script to combine files in a directory into a single text file
param(
[string]$FolderPath,
[string]$Extension = "txt",
[ValidateSet("name", "date", "name-reverse", "date-reverse")]
[string]$Sort = "name",
[switch]$Recursive
)
Write-Host "------------------------------------------------------------------------------------------------"
Write-Host ""
@ThioJoe
ThioJoe / GetSuperHiddenExtensions.ps1
Last active October 23, 2024 15:05
This PowerShell script finds file extensions that are not shown even when Windows is set to show extensions, then outputs the results to a csv file spreadsheet
# This script will search through the Windows Registry to find file extensions that are not shown even when the "Hide extensions for known file types" option is disabled.
# It does this by looking for file types with the NeverShowExt property set, as well as any CLSID references associated with the file types.
# Author: ThioJoe
# Updated: 9/4/2024 (First Version)
#
# How to Use:
# 1. Open PowerShell and navigate to the path containing this script using the 'cd' command.
# 2. Run the following command to allow running scripts for the current session:
# Set-ExecutionPolicy -ExecutionPolicy unrestricted -Scope Process
# 3. Without closing the PowerShell window, run the script by typing the name of the script file starting with .\ for example:
@ThioJoe
ThioJoe / Windows_XML_String_Resolver.ps1
Last active August 25, 2024 04:30
Takes an XML file that contains windows embedded DLL string references and outputs a new version with the resolved actual string values.
# Windows XML String Resolver
# Author: ThioJoe
#
# Purpose: This script takes an XML file that contains string references (e.g., "@shell32.dll,-1234")
# and resolves them to their actual string values. It's particularly useful for working with
# Windows resource files or any XML that uses similar string reference formats.
#
# How to Use:
# 1. Open PowerShell and navigate to the path containing this script using the 'cd' command.
# 2. Run the following command to allow running scripts for the current session:
@ThioJoe
ThioJoe / Get_All_Shell_Folder_Shortcuts.ps1
Last active October 11, 2024 18:05
Fetches all shell folders from Windows Registry and creates a shortcut to each, while attempting to determine the proper name and icon. Also outputs CSV file with results.
# NOTE - THIS SCRIPT IS NOW OBSOLETE - SEE MY OTHER REPO FOR A MUCH MORE COMPREHENSIVE TOOL: https://github.com/ThioJoe/Windows-Super-God-Mode
# Get All Shell Folder Shortcuts Script (Updated 8/10/2024)
# Original source: https://gist.github.com/ThioJoe/16eac0ea7d586c4edba41b454b58b225
# This PowerShell script is designed to find and create shortcuts for all special shell folders in Windows.
# These folders can be identified through their unique Class Identifiers (CLSIDs) or by their names.
# The script also generates CSV files listing these folders and associated tasks/links.
# How to Use:
# 1. Open PowerShell and navigate to the path containing this script using the 'cd' command.
@ThioJoe
ThioJoe / cheat.bat
Last active October 16, 2024 17:33
"Cheat" Command Wrapper Script - Makes it easier to search specific terms with 'cheat' tool. Recommended to rename to "c.bat" for easy calling.
:: -----------------------------------------------------------------------------------------
:: Cheat Command Wrapper Script
:: -----------------------------------------------------------------------------------------
:: This batch script acts as a wrapper for 'cheat.exe', enhancing its functionality
:: by allowing more intuitive command-line interactions. Specifically, it:
::
:: 1. Directly accesses cheatsheets or tags with a single argument.
:: 2. Facilitates search within a cheatsheet using multiple arguments, treating them
:: as a single search query.
:: 3. Dynamically resolves the paths to the community and personal cheatsheets
@ThioJoe
ThioJoe / DisableUSBPowerManagement.ps1
Last active October 27, 2024 11:14
PowerShell script to disable Windows power management on all currently connected serial ports, including most (if not all) USB devices and adapters.
# PowerShell script to disable Windows power management on all currently connected serial ports, including USB adapters
# In simpler terms, it prevents Windows from turning off connected serial devices to save power.
# Equivalent to right-clicking on a serial port device in Device Manager > Properties > "Power Management" Tab > Unchecking "Allow the computer to turn off this device to save power."
$hubs = Get-CimInstance -ClassName Win32_SerialPort | Select-Object Name, DeviceID, Description
$powerMgmt = Get-CimInstance -ClassName MSPower_DeviceEnable -Namespace root\wmi
foreach ($p in $powerMgmt) {
$IN = $p.InstanceName.ToUpper()
foreach ($h in $hubs) {
@ThioJoe
ThioJoe / WhisperCPP-Transcribe.bat
Last active May 13, 2024 07:48
WhisperCPP Batch File Script
:: ---- Lines beginning with :: are comments ----
:: This script is meant to make it easy to transcribe a video file using WhisperCPP.
:: You can simply drag a video file into the cmd window, then it will use ffmpeg to extract the audio, then transcribe using WhisperCPP and output to a text file.
::
@echo off
set /p videopath="Enter the full path to the video file to transcribe: "
:: Remove quotes from the input path
set videopath=%videopath:"=%
@ThioJoe
ThioJoe / Icon-Source-Finder.ps1
Last active September 14, 2024 21:53
PowerShell script that finds the icon source for a given file, including system files.
# This PowerShell script finds the icon source for a given file.
# It first tries to extract the icon from the associated executable,
# and if not found, it looks up the icon in the Windows Registry.
# Author: ThioJoe / GitHub.com/ThioJoe
param(
[string]$initialFilePath # Initial file path parameter for direct execution
)
# Function to prompt the user for a file path.
@ThioJoe
ThioJoe / Copy-GPU-Drivers-VM.ps1
Created January 5, 2024 19:40
PowerShell script to copy GPU drivers to Hyper-V Virtual Machine for passthrough.
# Description: This script will automatically copy the necessary GPU drivers from your current host machine into a Hyper-V Virtual Machine
# so you can pass through the GPU to the VM. You should run this whenever you update your graphics drivers on the host.
#
# Author: ThioJoe -- https://github.com/ThioJoe
#
# Note: Currently this only works for Nvidia GPUs. But it does support if you have multiple GPUs.
#
# OPTIONAL ARGUMENTS:
# -debug | Enables debug messages that pause the script for each step (No additional string required, just add -debug)
# -name | Sets the virtual machine name so it doesn't need to ask