DimiG / myWINscripts

My handy Windows scripts I use daily presented for public

Home Page:http://dimig.blogspot.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

myWINscripts

This repository dedicated to myOWN Windows scripts I use for daily purposes.

Repositories divided between Windows and Linux/Mac/UNIX scripts due to an incompatibility with special characters inside the text files and different encoding.

Scripts description

PowerShell folder

  • BackupFiles.ps1: Backup networked files locally.
    Note : To run this script by Task Scheduler use this command line:
    powershell.exe -noexit &'C:\bin\scripts\BackupFiles.ps1'
    This code may contain bugs.
    Requires : PowerShell Version 2.0
    Important: Networked resources must be exist and open for current user. Check folder names below the script

  • Convert2.ps1: Transcode and Rip DVD to video format you wish. This script use ffmpeg and HandBrakeCLI for windows to encode. Provide FPS, video format and aspect ratio changes. MPEG video tested with SONY SMP-U10 USB player.
    Note : Played much with functions in PowerShell. ;) This code is not well optimized.
    Requires : PowerShell Version 2.0, ffmpeg and HandBrakeCLI for Windows
    Important: ffmpeg and HandBrakeCLI MUST BE LOCATED in "C:\bin"

  • ripDVD.ps1: Transcode and Rip DVD to video MP4 format. This script use HandBrakeCLI and dd for Windows. Provide ISO file creation from DVD media.
    Requires : PowerShell Version 4.0 and HandBrakeCLI MinGW x86_64 for Windows.
    dd for Windows.
    Important: HandBrakeCLI and dd MUST BE LOCATED in "C:\bin"

  • authorDVD.ps1: Author DVD-VIDEO format by this simple script. This script use FFmpeg, dvdauthor, mkisofs and ISOWriter for Windows. Provide ISO file creation and ISO file burn.
    Requires : PowerShell Version 4.0, FFmpeg, dvdauthor, mkisofs
    and ISOWriter for Windows.
    Important: All CLI utilities MUST BE LOCATED in "C:\bin" (PATH specified also)
    The dvd.xml example file located in authorDVD.ps1 folder. Drop it to your working folder.

  • MKVripper.ps1: MKV to MP4 lossless converter. This script use mkvmerge, mkvextract and MP4Box for Windows.
    Requires : PowerShell Version 4.0, mkvmerge, mkvextract and MP4Box for Windows
    Important: All CLI utilities MUST BE LOCATED in "C:\bin" (PATH specified also)
    MP4 doesn't officially support AC3 audio so the audio track should be converted into
    a supported format (eg. AAC, MP3), if U WANT the file to be PLAYABLE with something else than VLC. ;)

  • SynBackUP.ps1: Backup the Synology NAS WEB site by rsync on Windows platform via SSH. This script use Rsync for Windows and PowerShell.
    Requires : PowerShell Version 4.0 and Rsync for Windows.
    dd for Windows.
    Important: rsync.exe MUST BE ACCESSIBLE in Path environment set

  • FileRenamerGUI.ps1: This script rename the bunch of files by adding numbers. Created in a GUI form.
    Maybe useful for music album renaming. No additional modules required.
    Requires : PowerShell Version 4.0
    Important: The icon file rename128x128.ico MUST be located same directory as FileRenamerGUI.ps1
    To start the script CREATE the link to script and ADD the code there
    powershell.exe -sta -WindowStyle hidden -noprofile -nologo -command "C:\FileRenamerGUI.ps1"

  • RoboSync.ps1: This script backup the huge amount of data from Avid Media server by Windows internal Robocopy.exe utility.
    You can use it with any other server also. The current script help with complex settings.
    Note : Available via scoop and dgbucket
    Requires : PowerShell Version 4.0 or newer.
    Important: BE CAREFUL WITH DIRECTION OF SYNCING!!! You may LOSS data if incorrect Source/Destination path!
    Get-Help for additional info.

  • ProResMaker_2016.ps1: This script converts the video file to ProRes422 codec. It is useful in professional video facilities.
    Run Get-Help ProResMaker_2016.ps1 for MORE information.
    Note : Available via scoop and dgbucket
    Requires : PowerShell Version 4.0 or newer, FFmpeg.
    Important: FFmpeg MUST be accessible for program to work!.

  • ProResCreator.ps1: One more script implementation for ProRes422 video files encoding. It is useful in professional video facilities.
    Run Get-Help ProResCreator.ps1 or ProResCreator.ps1 /? for MORE information.
    Note : Available via scoop and dgbucket
    Requires : PowerShell Version 4.0 or newer, ffmbc.
    Important: ffmbc can be installed via scoop and dgbucket.

  • Eject.ps1: This simple script Ejects the flash disk from Windows system.
    Run Get-Help eject.ps1 for MORE information.
    Requires : PowerShell Version 4.0 or newer.
    Important: Just read the Help before start.

  • EncAvidMXF_2016.ps1: This script converts the video file to Avid DNxHD codec and add it into video MXF file format. It is useful in professional video facilities.
    This script has been tested with Avid Media Composer 7.0.4 (PC version).
    Run Get-Help EncAvidMXF_2016.ps1 for MORE information.
    Requires : PowerShell Version 4.0 or newer, FFmpeg and bmx-win32-exe-snapshot for MXF writing.
    Important: FFmpeg and BMX MUST be accessible for program to work!.

  • ConvertDVD_2016.ps1: This script converts DVD-VIDEO structure to MP4 video file or ISO image. It is useful for DVD-VIDEO discs grubbing.
    Run Get-Help ConvertDVD_2016.ps1 for MORE information.
    Requires : PowerShell Version 4.0 or newer, FFmpeg and HandBrake
    Important: FFmpeg and HandBrake MUST be accessible for program to work!.

  • EncMKV_2016.ps1: Current script converts video file with multi-channel (5.1) audio to MKV (Matroska) format with multi-channel and stereo track.
    In production facilities we use ProRes with multi-channel audio.
    Run Get-Help EncMKV_2016.ps1 for MORE information.
    Requires : PowerShell Version 4.0 or newer, FFmpeg, MKVmerge and aften (A/52 audio encoder)
    Important: FFmpeg, MKVmerge and aften MUST be accessible in system PATH for program to work!.

  • PassGEN.ps1: This script generates the passwords by PowerShell.
    Run Get-Help PassGEN.ps1 for MORE information.
    Note : Available via scoop and dgbucket
    Requires : PowerShell Version 5.0 or newer.

  • PSWinUpdate.ps1: This script helps to install updates on Windows platform from PowerShell.
    Run Get-Help PSWinUpdate.ps1 or PSWinUpdate.ps1 /? for MORE information.
    Note : Available via scoop and dgbucket
    Requires : PowerShell Version 4.0 or newer, Windows Update PowerShell Module.
    Important: Windows Update PowerShell Module CAN be located in:
    C:\Windows\System32\WindowsPowerShell\v1.0\Modules
    Importing the module by: PS > Import-Module PSWindowsUpdate

  • WinSYSbackUp.ps1: Current script helps to create the Windows System Backup for emergency purposes.
    Run Get-Help WinSYSbackUp.ps1 or WinSYSbackUp.ps1 /? for MORE information.
    Note : Available via scoop and dgbucket
    Requires : PowerShell Version 4.0 or newer.
    Important: Assumes that computer uses disk C: as system drive by default.

  • WindowsPowerShell: My implementation of PowerShell modules.
    Note : Please kindly read instructions inside modules. ;) This code may contain bugs.
    Requires : PowerShell Version 2.0
    Important: WindowsPowerShell folder must be located inside your user Documents folder. Don't change the file names and folder structure.

  • All Scripts: Note : Some scripts MAY HAVE the Russian localization in messages.

Python folder

  • sendMail.py: (SendMail folder) This script is example how to send e-mails by Python script. The CLASS uses just for fun.
    Note : No special rules to use it. Just read the comments and change the variables in this code to your needs.
    Requires : Python 2.7.7 MSC v.1500 64 bit (AMD64) on win32, Microsoft Windows 7 and above.

  • AvidProjBackUP.py: (AvidProjBAK2 folder) This script backup (ZIP) the Avid projects located in Avid shared folder on local hardrive to Avid video server which is located on virtual Z: disk.
    Note : This is a Windows platform specific script and MUST be changed for other platforms. The additional AvidProjBackUP.spec, file_version_info.txt and BackupFolder_128x128.ico needed for executable creating by pyinstaller.
    Requires : Python 2.7.7 MSC v.1500 64 bit (AMD64) on win32, Microsoft Windows 7 and above, Cross-platform colored terminal text Python package (colorama).
    Important: The local Avid Projects usually located in "C:\Users\Public\Documents\Shared Avid Projects" by default. The BackUP inside the ZIP archive pushing to "Z:\BackUP" folder on video server. Read comments inside the script file for further information.

  • pingTEST.py: (SubProcess folder) This script just an example how to invoke the subprocess with CLI program from Python code.
    Note : This script tested by Python 2.7.8 on Synology platform.
    Requires : Python 2.7.8

  • projectBackUP.py: (AvidProjBAK1 folder) This script backup (mirror) the Avid projects located in shared folder by Windows internal Robocopy (Robust File Copy for Windows) program. No additional modules required.
    Note : Two mirrors created in separate folders by current ODD or EVEN date.
    Requires : Python 2.7.7, Microsoft Windows 7 and above
    Important: JOBtask folder MUST be located as "C:\JOBtask" with two job task configuration files inside ProjectBackup1.rcj and ProjectBackup2.rcj. They MUST be corrected for your purposes.
    Read comments inside job task files.

  • say.py: (Say folder) This script demonstrate how to use COM components of Microsoft Speech API by Python. This script says the words from CSV file by voice of Microsoft Anna. The format for CSV file line by line is:
    1. Sentence to say
    2. Delay in seconds between next sentence
    Note : Microsoft Speech API need to be installed and function
    Requires : Python 2.7.7, Microsoft Windows 7 and above
    Important: The message.scv file MUST be located in the same folder as a script itself

  • example.spec: (PyInstallCFG) This is an example of spec file for PyInstaller (Windows executable file creator) The "Tree('data', prefix='data')" line allow to implement the data folder with files inside the executable
    Note : file_version_info.txt help to create the metadata inside the executable file
    Requires : Python 2.7.7, Microsoft Windows 7 and above, PyInstaller
    Important: Data folder (data) MUST be located in the same folder as spec file

  • All Scripts: Note : Some scripts MAY HAVE the Russian localization in messages.

CMD folder

  • mov2mp4-hb.cmd: This Windows CMD script convert the video file from MOV to H264 MP4 720p format.
    Note : Run this script where your MOV files located. It will automatically convert one by one to MP4.
    Requires : Handbrake-cli MUST be accessible in your system for program to work!

  • All Scripts: Note : Some scripts MAY HAVE the Russian localization in messages.

WinPE folder

  • WinPEmaker: This Windows CMD script helps to create the Windows PE image. Windows Preinstallation Environment (also known as Windows PE and WinPE) is a lightweight version of Windows used for the deployment of PCs, workstations, and servers, or troubleshooting an operating system while it is offline. It is intended to replace MS-DOS boot disks and can be booted via USB flash drive, PXE, iPXE, CD-ROM or hard disk. Traditionally used by large corporations and OEMs (to preinstall Windows client operating systems on PCs during manufacturing).
    Note : Install the Windows Assessment and Deployment Kit (ADK) and adding the Deployment Tools and Windows Preinstallation Environment features according to official Microsoft documentation. If you're using installing the ADK for Windows 10, version 1809, Windows PE is a separate add-on that you'll need to download and install after you install the ADK. To make WinPE with PXE boot follow official instruction HERE. Your TFTP server MUST be on Windows platform. Mac OS and Linux tftp server won't work.
    Important : The file README.md from WinPEmaker folder should be located inside the WIM image here: X:\Windows\Apps. The Microsoft original scripts from mscripts folder should be located here: X:\Windows\Scripts. The custom made startnet.cmd inside the WIM image here: X:\Windows\System32. The Create-VHDX.txt and WinPEmaker.cmd stay located on host engineer machine. According to official Microsoft documentation the pre-build WinPE is located in C:\WinPE_amd64_PS. The prepared final images in C:\VHD. The current variant contain PowerShell also.

  • All Scripts: Note : Files contain CRLF in the end of lines (EOL) cause it is Windows scripts. Otherwise, performance is NOT GUARANTEED!

Qemu folder

  • vm.cmd: QEMU is a hosted virtual machine monitor. It emulates the machine's processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it to run a variety of guest operating systems. It also can be used with KVM to run virtual machines at near-native speed (by taking advantage of hardware extensions such as Intel VT-x). QEMU can also do emulation for user-level processes, allowing applications compiled for one architecture to run on another.
    This CMD script helps to run the Qemu Virtual Machine VM on Windows platform.
    Requires : Qemu MUST BE pre installed on your system.

  • All Scripts: Note : Files contain CRLF in the end of lines (EOL) cause it is Windows scripts. Otherwise, performance is NOT GUARANTEED!

  • To be continued...

License

These code may be COPYRIGHT PROTECTED by ©2019 DimiG

About

My handy Windows scripts I use daily presented for public

http://dimig.blogspot.com


Languages

Language:PowerShell 76.1%Language:Python 14.1%Language:Batchfile 9.9%