PowerShell – Create Zip and Backup File

  Notes Add-Type Join-Path Copy-Item Test-Path Remove-Item io.compression.zipfile Get Basic Details of a Loaded Assembly [appdomain]::currentdomain.GetAssemblies() | Where-Object Location -match ‘mscorlib’ Discover The Types/Classes Inside a Given Assembly ([appdomain]::currentdomain.GetAssemblies() | Where-Object Location -Match ‘mscorlib’).gettypes() To Discover the Members Within a Class (([appdomain]::currentdomain.GetAssemblies() | Where-Object location -match ‘mscorlib’).gettypes() | Where-Object name -eq ‘string’).getmembers() | Format-Table name, Read More …

PowerShell – Automate Cleanmgr.exe

/sagerun:1 ‘ Active Setup Temp Folders ‘ Content Indexer Cleaner ‘ Downloaded Program Files ‘ GameNewsFiles ‘ GameStatisticsFiles ‘ GameUpdateFiles ‘ Internet Cache Files ‘ Memory Dump Files ‘ Microsoft Office Temp Files ‘ Offline Pages Files ‘ Old ChkDsk Files ‘ Previous Installations ‘ Recycle Bin ‘ Service Pack Cleanup ‘ Setup Log Files Read More …

Batch – Return Major Build Version

Command Line FOR /f “tokens=1,2,3,4 delims=[.]” %a IN (‘ver’) DO ECHO %d In Script FOR /f “tokens=1,2,3,4 delims=[.]” %%a IN (‘ver’) DO SET wBuild=%%d ECHO %wBuild%   Notes for if %wBuild% LSS 19041 exit if %wBuild% LEQ 18362 exit if %wBuild% EQU 18362 exit :: 1903 if %wBuild% EQU 17763 exit :: 1809 if %wBuild% Read More …

AutoIt – Copy Current Page to Clipboard – Search for String

#include #include ; wait Sleep(5000) ; loop routine While 1 ; Click at the current mouse position. MouseClick($MOUSE_CLICK_LEFT) Sleep(5000) ; select all Send (“^a”) Sleep(1000) ; copy to clipboard Send (“^c”) Sleep(1000) ; return clipboard to string $sData = ClipGet() ; what to look for $searchstring = “AddSearchStringHere” ; logic for detection If StringInStr($sData, $searchstring) Read More …

Windows – Could not load file or assembly Accessibility, Version=4.0.0.0

Error   See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.IO.FileNotFoundException: Could not load file or assembly ‘Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified. File name: ‘Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ at System.Windows.Forms.Control.OnHandleCreated(EventArgs Read More …