Skip to content

Instantly share code, notes, and snippets.

View Computer-Tsu's full-sized avatar

Computer-Tsu

View GitHub Profile
@Computer-Tsu
Computer-Tsu / Convert Error Code.md
Created February 28, 2024 02:35
HowTo Converting Windows application Installer error codes numbers return results
Error Code Dec Error Code Error String Description
0x00000000 -4294967296 Success
0x0000007B -4294967173 Error_Invalid_Name The filename, directory incorrect

calc.exe
Menu, Programmer
[Hex] 0x7B
[Dec] 123

@Computer-Tsu
Computer-Tsu / DateStamp.bat
Created February 28, 2024 02:16
set datestamp=20240229
for /F "tokens=2,3,4 delims=/ " %A in ('date /t') do set datestamp=%C%A%B
@Computer-Tsu
Computer-Tsu / Enable-RDP.cmd
Created February 28, 2024 00:42
Enable Remote Desktop Connection on Windows
REM Enable Remote Desktop Connection, requires reboot to take effect.
%windir%\system32\reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
@Computer-Tsu
Computer-Tsu / Disable-Standby-AC.cmd
Created February 28, 2024 00:36
Windows Power Config disable sleep when plugged in
REM Disable sleep, hibernate, standby when plugged in
REM disable sleep timer when plugged in
%windir%\system32\powercfg.exe /x standby-timeout-ac 0
%windir%\system32\powercfg.exe /x hibernate-timeout-ac 0
@Computer-Tsu
Computer-Tsu / Get-UpdatesPendingReboot.bat
Created February 28, 2024 00:34
Pending Reboot Registry Keys
reg query "hklm\software\microsoft\windows\currentversion\windowsupdate\auto update\rebootrequired"
reg query "hklm\software\microsoft\windows\currentversion\component based servicing\rebootpending"
reg query "hklm\system\currentcontrolset\control\session manager"
REM Check this key to see what is running.
REM reg query "HKEY_LOCAL_Machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\InProgress"
@Computer-Tsu
Computer-Tsu / Unblock-File.bat
Created February 5, 2024 19:22
Unblock a downloaded file from the Internet
REM DIR /R
echo.> "MyDownloadedFile.exe":Zone.Identifier
REM echo.>"OfficeSetup (1).exe:SmartScreen:$DATA"

Using the mouse, confirm the problem.
Right-click Start menu, open Device Manager
Can also Event Viewer: Event 411, Kernel-PnP (Log Name: Microsoft-Windows-Kernel-PnP/Device Configuration, Source: Kernel-PnP, Event ID: 411, Level: Error, User: SYSTEM, Task Category: None)

Device status:
Windows cannot start this hardware device because its configuration information (in the registry) is incomplete or damaged. (Code 19)

Using mouse, click Start, Windows Ease of Access folder, On Screen Keyboard

@Computer-Tsu
Computer-Tsu / UserList.ps1
Created December 7, 2023 18:06
Script list Windows user accounts, identify MSA or Local
Get-LocalUser | SelectObject Name,PrincipalSource,Enabled,LastLogon,PasswordExpires,PasswordRequired | FT
@Computer-Tsu
Computer-Tsu / Compress-WinSXS.bat
Last active February 28, 2024 00:39
Windows WinSxS Cleanup
@ECHO Compress the WinSxS before backup of System State. Analyze can take hours and will finish with a Reboot? Y or N (no Enter required!)
dism /Online /Cleanup-Image /AnalyzeComponentStore
dism /Online /Cleanup-Image /StartComponentCleanup
@Computer-Tsu
Computer-Tsu / .bash_profile
Created September 18, 2023 12:18 — forked from mniak/.bash_profile
My OS #config files
# FOR MACOSX: curl -o ~/.bash_profile https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/.bash_profile -H 'Cache-Control: no-cache'
# FOR LINUX: curl -o ~/.bashrc https://gist.githubusercontent.com/mniak/31cea1e0e50809dbb4e5dd13d689644c/raw/.bash_profile -H 'Cache-Control: no-cache'
export PS1="\[\e[33m\]\W\[\e[m\] \\$\[$(tput sgr0)\] "
export CLICOLOR=1
export TERM=xterm-256color
export DOTNET_CLI_TELEMETRY_OPTOUT=1
if [ $(uname) == "Darwin" ]; then #OSX specific configuration