Python – Prevent Screen Sleep and Screensaver

email me

Modifying the SetThreadExecutionState will allow you to control whether or not the computer will idle—no idle, no monitor sleep or screensaver.

import ctypes
ctypes.windll.kernel32.SetThreadExecutionState(0x80000002)
input('{Press enter to exit}')
ctypes.windll.kernel32.SetThreadExecutionState(0x80000000)


Python Terminal

 

Notes

SetThreadExecutionState function

 

tags: MrNetTek

Batch – Windows – Setting Screen Brightness

email me

This demonstrates how to control display brightness using simple batch scripting and the powercfg.exe command.

@echo off

set /P brightness=Enter brightness level (1-100):% brightness:  %=%

:: Set Brightness Level
POWERCFG /SETDCVALUEINDEX 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 7516b95f-f776-4464-8c53-06167f40cc99 aded5e82-b909-4619-9949-f5d71dac0bcb %brightness%
POWERCFG /SETACVALUEINDEX 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 7516b95f-f776-4464-8c53-06167f40cc99 aded5e82-b909-4619-9949-f5d71dac0bcb %brightness%

:: Set Active
POWERCFG /S 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

timeout /t 20

:: Restore Brightness Level
POWERCFG /SETDCVALUEINDEX 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 7516b95f-f776-4464-8c53-06167f40cc99 aded5e82-b909-4619-9949-f5d71dac0bcb 100
POWERCFG /SETACVALUEINDEX 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 7516b95f-f776-4464-8c53-06167f40cc99 aded5e82-b909-4619-9949-f5d71dac0bcb 100

:: Set Active
POWERCFG /S 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c

pause

 

 

Notes

Extrapolate Power Scheme Data

for /f “tokens=*” %%i in (‘powercfg -q ^| find “Power Scheme GUID”‘) do set pwrSchm=%%i
set pwrSchm=%pwrSchm:~19,36%

for /f “tokens=*” %%i in (‘powercfg -q ^| find “(Display)”‘) do set dsply=%%i
set dsply=%dsply:~15,36%

for /f “tokens=*” %%i in (‘powercfg -q ^| find “(Display brightness)”‘) do set brtnss=%%i
set brtnss=%brtnss:~20,36%


Power Scheme Details

Power Scheme GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High performance)
GUID Alias: SCHEME_MIN
Subgroup GUID: 0012ee47-9041-4b5d-9b77-535fba8b1442 (Hard disk)
GUID Alias: SUB_DISK
Power Setting GUID: 6738e2c4-e8a5-4a42-b16a-e040e769756e (Turn off hard disk after)
GUID Alias: DISKIDLE
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0xffffffff
Possible Settings increment: 0x00000001
Possible Settings units: Seconds
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x000004b0

Subgroup GUID: 02f815b5-a5cf-4c84-bf20-649d1f75d3d8 (Internet Explorer)
Power Setting GUID: 4c793e7d-a264-42e1-87d3-7a0d2f523ccd (JavaScript Timer Frequency)
Possible Setting Index: 000
Possible Setting Friendly Name: Maximum Power Savings
Possible Setting Index: 001
Possible Setting Friendly Name: Maximum Performance
Current AC Power Setting Index: 0x00000001
Current DC Power Setting Index: 0x00000001

Subgroup GUID: 0d7dbae2-4294-402a-ba8e-26777e8488cd (Desktop background settings)
Power Setting GUID: 309dce9b-bef4-4119-9921-a851fb12f0f4 (Slide show)
Possible Setting Index: 000
Possible Setting Friendly Name: Available
Possible Setting Index: 001
Possible Setting Friendly Name: Paused
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000000

Subgroup GUID: 19cbb8fa-5279-450e-9fac-8a3d5fedd0c1 (Wireless Adapter Settings)
Power Setting GUID: 12bbebe6-58d6-4636-95bb-3217ef867c1a (Power Saving Mode)
Possible Setting Index: 000
Possible Setting Friendly Name: Maximum Performance
Possible Setting Index: 001
Possible Setting Friendly Name: Low Power Saving
Possible Setting Index: 002
Possible Setting Friendly Name: Medium Power Saving
Possible Setting Index: 003
Possible Setting Friendly Name: Maximum Power Saving
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000000

Subgroup GUID: 238c9fa8-0aad-41ed-83f4-97be242c8f20 (Sleep)
GUID Alias: SUB_SLEEP
Power Setting GUID: 29f6c1db-86da-48c5-9fdb-f2b67b1f44da (Sleep after)
GUID Alias: STANDBYIDLE
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0xffffffff
Possible Settings increment: 0x00000001
Possible Settings units: Seconds
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000000

Power Setting GUID: 94ac6d29-73ce-41a6-809f-6363ba21b47e (Allow hybrid sleep)
GUID Alias: HYBRIDSLEEP
Possible Setting Index: 000
Possible Setting Friendly Name: Off
Possible Setting Index: 001
Possible Setting Friendly Name: On
Current AC Power Setting Index: 0x00000001
Current DC Power Setting Index: 0x00000001

Power Setting GUID: 9d7815a6-7ee4-497e-8888-515a05f02364 (Hibernate after)
GUID Alias: HIBERNATEIDLE
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0xffffffff
Possible Settings increment: 0x00000001
Possible Settings units: Seconds
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000000

Power Setting GUID: bd3b718a-0680-4d9d-8ab2-e1d2b4ac806d (Allow wake timers)
GUID Alias: RTCWAKE
Possible Setting Index: 000
Possible Setting Friendly Name: Disable
Possible Setting Index: 001
Possible Setting Friendly Name: Enable
Possible Setting Index: 002
Possible Setting Friendly Name: Important Wake Timers Only
Current AC Power Setting Index: 0x00000001
Current DC Power Setting Index: 0x00000001

Subgroup GUID: 2a737441-1930-4402-8d77-b2bebba308a3 (USB settings)
Power Setting GUID: 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 (USB selective suspend setting)
Possible Setting Index: 000
Possible Setting Friendly Name: Disabled
Possible Setting Index: 001
Possible Setting Friendly Name: Enabled
Current AC Power Setting Index: 0x00000001
Current DC Power Setting Index: 0x00000001

Subgroup GUID: 4f971e89-eebd-4455-a8de-9e59040e7347 (Power buttons and lid)
GUID Alias: SUB_BUTTONS
Power Setting GUID: 5ca83367-6e45-459f-a27b-476b1d01c936 (Lid close action)
GUID Alias: LIDACTION
Possible Setting Index: 000
Possible Setting Friendly Name: Do nothing
Possible Setting Index: 001
Possible Setting Friendly Name: Sleep
Possible Setting Index: 002
Possible Setting Friendly Name: Hibernate
Possible Setting Index: 003
Possible Setting Friendly Name: Shut down
Current AC Power Setting Index: 0x00000001
Current DC Power Setting Index: 0x00000001

Power Setting GUID: 7648efa3-dd9c-4e3e-b566-50f929386280 (Power button action)
GUID Alias: PBUTTONACTION
Possible Setting Index: 000
Possible Setting Friendly Name: Do nothing
Possible Setting Index: 001
Possible Setting Friendly Name: Sleep
Possible Setting Index: 002
Possible Setting Friendly Name: Hibernate
Possible Setting Index: 003
Possible Setting Friendly Name: Shut down
Possible Setting Index: 004
Possible Setting Friendly Name: Turn off the display
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000003

Power Setting GUID: 96996bc0-ad50-47ec-923b-6f41874dd9eb (Sleep button action)
GUID Alias: SBUTTONACTION
Possible Setting Index: 000
Possible Setting Friendly Name: Do nothing
Possible Setting Index: 001
Possible Setting Friendly Name: Sleep
Possible Setting Index: 002
Possible Setting Friendly Name: Hibernate
Possible Setting Index: 003
Possible Setting Friendly Name: Shut down
Possible Setting Index: 004
Possible Setting Friendly Name: Turn off the display
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000001

Power Setting GUID: a7066653-8d6c-40a8-910e-a1f54b84c7e5 (Start menu power button)
GUID Alias: UIBUTTON_ACTION
Possible Setting Index: 000
Possible Setting Friendly Name: Sleep
Possible Setting Index: 001
Possible Setting Friendly Name: Hibernate
Possible Setting Index: 002
Possible Setting Friendly Name: Shut down
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000000

Subgroup GUID: 501a4d13-42af-4429-9fd1-a8218c268e20 (PCI Express)
GUID Alias: SUB_PCIEXPRESS
Power Setting GUID: ee12f906-d277-404b-b6da-e5fa1a576df5 (Link State Power Management)
GUID Alias: ASPM
Possible Setting Index: 000
Possible Setting Friendly Name: Off
Possible Setting Index: 001
Possible Setting Friendly Name: Moderate power savings
Possible Setting Index: 002
Possible Setting Friendly Name: Maximum power savings
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000000

Subgroup GUID: 54533251-82be-4824-96c1-47b60b740d00 (Processor power management)
GUID Alias: SUB_PROCESSOR
Power Setting GUID: 893dee8e-2bef-41e0-89c6-b55d0929964c (Minimum processor state)
GUID Alias: PROCTHROTTLEMIN
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0x00000064
Possible Settings increment: 0x00000001
Possible Settings units: %
Current AC Power Setting Index: 0x00000064
Current DC Power Setting Index: 0x00000005

Power Setting GUID: 94d3a615-a899-4ac5-ae2b-e4d8f634367f (System cooling policy)
GUID Alias: SYSCOOLPOL
Possible Setting Index: 000
Possible Setting Friendly Name: Passive
Possible Setting Index: 001
Possible Setting Friendly Name: Active
Current AC Power Setting Index: 0x00000001
Current DC Power Setting Index: 0x00000001

Power Setting GUID: bc5038f7-23e0-4960-96da-33abaf5935ec (Maximum processor state)
GUID Alias: PROCTHROTTLEMAX
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0x00000064
Possible Settings increment: 0x00000001
Possible Settings units: %
Current AC Power Setting Index: 0x00000064
Current DC Power Setting Index: 0x00000064

Subgroup GUID: 7516b95f-f776-4464-8c53-06167f40cc99 (Display)
GUID Alias: SUB_VIDEO
Power Setting GUID: 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e (Turn off display after)
GUID Alias: VIDEOIDLE
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0xffffffff
Possible Settings increment: 0x00000001
Possible Settings units: Seconds
Current AC Power Setting Index: 0x00000708
Current DC Power Setting Index: 0x00000258

Power Setting GUID: aded5e82-b909-4619-9949-f5d71dac0bcb (Display brightness)
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0x00000064
Possible Settings increment: 0x00000001
Possible Settings units: %
Current AC Power Setting Index: 0x00000061
Current DC Power Setting Index: 0x00000014

Power Setting GUID: f1fbfde2-a960-4165-9f88-50667911ce96 (Dimmed display brightness)
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0x00000064
Possible Settings increment: 0x00000001
Possible Settings units: %
Current AC Power Setting Index: 0x00000064
Current DC Power Setting Index: 0x00000032

Power Setting GUID: fbd9aa66-9553-4097-ba44-ed6e9d65eab8 (Enable adaptive brightness)
GUID Alias: ADAPTBRIGHT
Possible Setting Index: 000
Possible Setting Friendly Name: Off
Possible Setting Index: 001
Possible Setting Friendly Name: On
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000001

Subgroup GUID: 9596fb26-9850-41fd-ac3e-f7c3c00afd4b (Multimedia settings)
Power Setting GUID: 03680956-93bc-4294-bba6-4e0f09bb717f (When sharing media)
Possible Setting Index: 000
Possible Setting Friendly Name: Allow the computer to sleep
Possible Setting Index: 001
Possible Setting Friendly Name: Prevent idling to sleep
Possible Setting Index: 002
Possible Setting Friendly Name: Allow the computer to enter Away Mode
Current AC Power Setting Index: 0x00000001
Current DC Power Setting Index: 0x00000001

Power Setting GUID: 10778347-1370-4ee0-8bbd-33bdacaade49 (Video playback quality bias.)
Possible Setting Index: 000
Possible Setting Friendly Name: Video playback power-saving bias.
Possible Setting Index: 001
Possible Setting Friendly Name: Video playback performance bias.
Current AC Power Setting Index: 0x00000001
Current DC Power Setting Index: 0x00000000

Power Setting GUID: 34c7b99f-9a6d-4b3c-8dc7-b6693b78cef4 (When playing video)
Possible Setting Index: 000
Possible Setting Friendly Name: Optimize video quality
Possible Setting Index: 001
Possible Setting Friendly Name: Balanced
Possible Setting Index: 002
Possible Setting Friendly Name: Optimize power savings
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000000

Subgroup GUID: e73a048d-bf27-4f12-9731-8b2076e8891f (Battery)
GUID Alias: SUB_BATTERY
Power Setting GUID: 5dbb7c9f-38e9-40d2-9749-4f8a0e9f640f (Critical battery notification)
GUID Alias: BATFLAGSCRIT
Possible Setting Index: 000
Possible Setting Friendly Name: Off
Possible Setting Index: 001
Possible Setting Friendly Name: On
Current AC Power Setting Index: 0x00000001
Current DC Power Setting Index: 0x00000001

Power Setting GUID: 637ea02f-bbcb-4015-8e2c-a1c7b9c0b546 (Critical battery action)
GUID Alias: BATACTIONCRIT
Possible Setting Index: 000
Possible Setting Friendly Name: Do nothing
Possible Setting Index: 001
Possible Setting Friendly Name: Sleep
Possible Setting Index: 002
Possible Setting Friendly Name: Hibernate
Possible Setting Index: 003
Possible Setting Friendly Name: Shut down
Current AC Power Setting Index: 0x00000002
Current DC Power Setting Index: 0x00000002

Power Setting GUID: 8183ba9a-e910-48da-8769-14ae6dc1170a (Low battery level)
GUID Alias: BATLEVELLOW
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0x00000064
Possible Settings increment: 0x00000001
Possible Settings units: %
Current AC Power Setting Index: 0x0000000a
Current DC Power Setting Index: 0x0000000a

Power Setting GUID: 9a66d8d7-4ff7-4ef9-b5a2-5a326ca2a469 (Critical battery level)
GUID Alias: BATLEVELCRIT
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0x00000064
Possible Settings increment: 0x00000001
Possible Settings units: %
Current AC Power Setting Index: 0x00000005
Current DC Power Setting Index: 0x00000005

Power Setting GUID: bcded951-187b-4d05-bccc-f7e51960c258 (Low battery notification)
GUID Alias: BATFLAGSLOW
Possible Setting Index: 000
Possible Setting Friendly Name: Off
Possible Setting Index: 001
Possible Setting Friendly Name: On
Current AC Power Setting Index: 0x00000001
Current DC Power Setting Index: 0x00000001

Power Setting GUID: d8742dcb-3e6a-4b3c-b3fe-374623cdcf06 (Low battery action)
GUID Alias: BATACTIONLOW
Possible Setting Index: 000
Possible Setting Friendly Name: Do nothing
Possible Setting Index: 001
Possible Setting Friendly Name: Sleep
Possible Setting Index: 002
Possible Setting Friendly Name: Hibernate
Possible Setting Index: 003
Possible Setting Friendly Name: Shut down
Current AC Power Setting Index: 0x00000000
Current DC Power Setting Index: 0x00000000

Power Setting GUID: f3c5027d-cd16-4930-aa6b-90db844a8f00 (Reserve battery level)
Minimum Possible Setting: 0x00000000
Maximum Possible Setting: 0x00000064
Possible Settings increment: 0x00000001
Possible Settings units: %
Current AC Power Setting Index: 0x00000007
Current DC Power Setting Index: 0x00000007

 

tags: MrNetTek

PowerShell – Base64 Encode/Decode

email me

This is how you embed resource files right into your PowerShell script, meaning….if you have loose files that are required by your script, you can include those files inside your script. Very cool!

Encoding/Decoding a Text File

clear-host

# Encode

$File1 = "c:\setup\YourFile.txt"

$Content1 = get-content $File1
$Bytes = [System.Text.Encoding]::UTF8.GetBytes($Content1)
$Encoded = [System.Convert]::ToBase64String($Bytes)
#$Encoded | set-content ($File1 + ".b64")
Write-Host "ENCODED: " $Encoded

# Decode
[System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($Encoded)) | Out-File -Encoding "ASCII" c:\setup\YourFileDecoded.txt
$Content2 = get-content c:\setup\YourFileDecoded.txt
Write-Host "DECODED: " $Content2

 

Encoding/Decoding an EXE

clear-host

# Encode

$FilePath = "c:\setup\foo.exe"
$File = [System.IO.File]::ReadAllBytes($FilePath);

# returns the base64 string
$Base64String = [System.Convert]::ToBase64String($File);

# Decode

function Convert-StringToBinary {
[CmdletBinding()]
param (
[string] $EncodedString
, [string] $FilePath = (‘{0}\{1}’ -f $env:TEMP, [System.Guid]::NewGuid().ToString())
)

try {
if ($EncodedString.Length -ge 1) {

# decodes the base64 string
$ByteArray = [System.Convert]::FromBase64String($EncodedString);
[System.IO.File]::WriteAllBytes($FilePath, $ByteArray);
}
}
catch {
}

Write-Output -InputObject (Get-Item -Path $FilePath);
}

$DecodedFile = Convert-StringToBinary -EncodedString $Base64String -FilePath C:\setup\foo.exe

 


Notes

Decode Base64 Image String

$Base64String = 'TheBase64StringHere'
$Image = "$env:TEMP\ImageName.png"
[byte[]]$Bytes = [convert]::FromBase64String($Base64String)
[System.IO.File]::WriteAllBytes($Image,$Bytes)

 

Read File into Byte Array

[byte[]]$Bytes1 = Get-Content "C:\PowerShell\foo1.exe" -Encoding byte

 

Write Byte Array to File

[System.IO.File]::WriteAllBytes("C:\PowerShell\foo2.exe", $Bytes2)

 

Convert Hex String to Byte Array

$Bytes2 = [byte[]]::new($Hex.Length / 2)

For($i=0; $i -lt $Hex.Length; $i+=2){
$Bytes2[$i/2] = [convert]::ToByte($Hex.Substring($i, 2), 16)
}

 

Convert Byte Array to Hex

$Hex = [bitconverter]::ToString($Bytes1).Replace("-", "");

or

$Hex = [System.Text.StringBuilder]::new($Bytes.Length * 2)

ForEach($byte in $Bytes){
$Hex.AppendFormat("{0:x2}", $byte) | Out-Null
}

 

Return Hex Values

function Get-HexValues
{
[CmdletBinding()] Param
(
[Parameter(Mandatory = $True, ValueFromPipelineByPropertyName = $True)]
[Alias("FullName","FilePath")] $Path,
[Int] $Width = 16,
[Int] $Count = -1,
[String] $PlaceHolder = ".",
[Switch] $NoOffset,
[Switch] $NoText
)

$linecounter = 0
#$placeholder = "."
get-content $path -encoding byte -readcount $width -totalcount $count |
foreach-object `
{
$paddedhex = $text = $null
$bytes = $_
foreach ($byte in $bytes)`
{
$byteinhex = [String]::Format("{0:X}", $byte)
$paddedhex += $byteinhex.PadLeft(2,"0") + " "
}

if ($paddedhex.length -lt $width * 3)
{ $paddedhex = $paddedhex.PadRight($width * 3," ") }
foreach ($byte in $bytes)`
{
if ( [Char]::IsLetterOrDigit($byte) -or
[Char]::IsPunctuation($byte) -or
[Char]::IsSymbol($byte) )
{ $text += [Char] $byte }
else
{ $text += $placeholder }
}
$offsettext = [String]::Format("{0:X}", $linecounter)
$offsettext = $offsettext.PadLeft(8,"0") + "h:"
$linecounter += $width # Increment linecounter.
if (-not $NoOffset) { $paddedhex = "$offsettext $paddedhex" }
if (-not $NoText) { $paddedhex = $paddedhex + $text }
$paddedhex
}
}
Get-HexValues C:\PowerShell\foo1.exe

 

Online Base64

 

tags: MrNetTek

Firefox – 67.0.4

email me

New Firefox is available here:

https://ftp.mozilla.org/pub/firefox/releases/67.0.4/win64/en-US/

 

Size

44.8 MB


Silent install

setup.exe -ms


Silent uninstall

“C:\Program Files\Mozilla Firefox\uninstall\helper.exe” /s


Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 67.0.4 (x64 en-US)


Notes

Version 67.0.4, first offered to Release channel users on June 20, 2019

Firefox 67.0.4 Released — Mozilla Patches Second 0-Day Flaw This Week

Mozilla Foundation Security Advisory 2019-19

 

tags: MrNetTek

Firefox – 67.0.3

email me

New Firefox is available here:

https://ftp.mozilla.org/pub/firefox/releases/67.0.3/win64/en-US/

 

Size

44.7 MB


Silent install

setup.exe -ms


Silent uninstall

“C:\Program Files\Mozilla Firefox\uninstall\helper.exe” /s


Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox 67.0.3 (x64 en-US)


Notes

Version 67.0.3, first offered to Release channel users on June 18, 2019

Mozilla Foundation Security Advisory 2019-18

 

tags: MrNetTek

Apple iTunes – 12.9.5.7

email me

New iTunes app is available from here: https://www.apple.com/itunes/download/win64

iTunes64Setup.exe – use 7zip to extract contents of file.


Contents of iTunes64Setup.exe


Size

262 MB


Silent Install

AppleApplicationSupport.msi /qn /norestart
AppleApplicationSupport64.msi /qn /norestart
AppleMobileDeviceSupport64.msi /qn /norestart
Bonjour64.msi /qn /norestart
AppleSoftwareUpdate.msi /qn /norestart

iTunes64.msi /qn /norestart IAcceptLicense=Yes ALLUSERS=1 DESKTOP_SHORTCUTS=1 INSTALL_ASUW=0 NO_ASUW=1 SCHEDULE_ASUW=0


MSI Property Table

UpgradeCode                                         {0880A3FD-2A1E-43C5-B020-09930E075D34}
REGSRCH_DESKTOP_SHORTCUTS       1
REGSRCH_MEDIA_DEFAULTS               1
REGSRCH_ITUNES_LANGID                  1033
MaintenanceMode                                Remove
ARPNOCHANGE                                     1
ProgressType                                          install
DefaultUIFont                                         Tahoma8
ALLUSERS                                                1
ARPCONTACT                                         AppleCare Support
ARPHELPLINK                                         http://www.apple.com/support/
ARPHELPTELEPHONE                            1-800-275-2273
ARPPRODUCTICON                                Installer.ico
ARPURLINFOABOUT                              http://www.apple.com/
ARPURLUPDATEINFO                            http://www.apple.com/itunes/
DISABLEADVTSHORTCUTS                   1
GEARASPIWDM_SERVICE_DELETED    #0
MSIRESTARTMANAGERCONTROL       Disable
ProductVersionMarketing                    12.9.5.7
ErrorDialog                                             SetupError
IAcceptLicense                                        No
RestartManagerOption                         1
Manufacturer                                         Apple Inc.
ProductCode                                           {A8AF3EF8-5010-4A92-BCCA-90F62A7D62B8}
ProductLanguage                                  1033
ProductName                                         iTunes
ProductVersion                                      12.9.5.7
caCommonExtensionBackupName    iTunes_back
caPackageExeName                              SetupAdmin.exe
SCHEDULE_ASUW                                  1
AdminProperties                                    DESKTOP_SHORTCUTS;MEDIA_DEFAULTS;
                                                                  REENABLEAUTORUN
SecureCustomProperties AMDS_IS_INSTALLED; AMDS_SERVICES_INSTALLED; APPLEAPPLICATIONSUPPORT_IS_INSTALLED; APPLEAPPLICATIONSUPPORT64_IS_INSTALLED; ASUW_IS_INSTALLED; AUTORUN; BONJOUR_IS_INSTALLED; BUSEROSVERSION; DESKTOP_SHORTCUTS; DONT_AUTO_SYNC_IPODS; EXISTINGINSTALLDIR; EXISTINGIPODINSTALLDIR; GEARASPIWDM_SERVICE_DELETED; IGNORE_STORE_APP; INSTALLDIR;IPODSUPPORT_IS_INSTALLED; ITUNES_IS_RUNNING; ITUNES_STORE_APP_INSTALLED;MEDIA_DEFAULTS; OLDIPODSERVICE; PCAST_URL_HANDLER;REENABLEAUTORUN; REGSRCH_DESKTOP_SHORTCUTS; REGSRCH_ITUNES_LANGID; REGSRCH_MEDIA_DEFAULTS; SCHEDULE_ASUW; UCRTINSTALLED; UNSUPPORTEDCPU; UNSUPPORTEDIPODSOFTWARE; UPGRADEFOUND_LEGACY; WIX_DOWNGRADE_DETECTED; WIX_UPGRADE_DETECTED
DirectoryTable100_amd64.BFF61907_AA2D_3A26_8666_98D956A62ABC DirectoryTable
DirectoryTable100_amd64.05F0B5F5_44A8_3793_976B_A4F17AECF92C DirectoryTable
DirectoryTable100_amd64.086AF9E3_99AE_32BC_936E_3B8F47860B7D DirectoryTable

 


Notes

Batch Install for SCCM

cd “%~dp0”

start /wait msiexec /i “AppleApplicationSupport.msi” /qn /norestart ALLUSERS=true /l “C:\Setup\AppleApplication.log”
start /wait msiexec /i “AppleApplicationSupport64.msi” /qn /norestart ALLUSERS=true /l “C:\Setup\AppleApplicationx64.log”
start /wait msiexec /i “AppleMobileDeviceSupport64.msi” /qn /norestart /l “C:\Setup\AppleMobileDevice.log”
start /wait msiexec /i “AppleSoftwareUpdate.msi” /qn /norestart /l “C:\Setup\AppleSoftwareUpdate.log”
start /wait msiexec /i “Bonjour64.msi” /qn /norestart /l “C:\Setup\Bonjour64.log”
start /wait msiexec /i “iTunes64.msi” /qn /norestart /l “C:\Setup\iTunes64.log”


Remove AppxPackage

C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell -ExecutionPolicy Bypass -Command “Get-AppxPackage *AppleInc.iTunes* | Remove-AppxPackage”


Uninstall

msiexec /x “{56DDDFB8-7F79-4480-89D5-25E1F52AB28F}” /qn
msiexec /x “{5A659BE5-849B-484E-A83B-DCB78407F3A4}” /qn
msiexec /x “{F8060941-C0AB-4BCE-88AC-F2FDA2E9F286}” /qn
msiexec /x “{A30EA700-5515-48F0-88B0-9E99DC356B88}” /qn
msiexec /x “{5FA8C4BE-8C74-4B9C-9B49-EBF759230189}” /qn
msiexec /x “{D9D08A8F-5A03-486A-AD4D-3A438D521F8B}” /qn

 

tags: MrNetTek

Google Chrome – 75.0.3770.100

email me

New Chrome browser is available here:

https://enterprise.google.com/intl/en_version/chrome/chrome-browser/ mirror

 

Size

56.4 MB


Silent Install

setup.msi /quiet /norestart


Silent Uninstall

msiexec /x{7F544E85-3FC4-3F6B-BE1C-679880E73AD3} /qn /norestart

“C:\Program Files (x86)\Google\Chrome\Application\75.0.3770.100\Installer\setup.exe” –uninstall –multi-install –chrome –system-level –force-uninstall


MSI Property Table

UpgradeCode                                {C1DFDF69-5945-32F2-A35E-EE94C99C7CF4}
AllowDowngradeSubstitution     false
ALLUSERS                                        1
ARPPRODUCTICON                       icon.ico
ARPNOMODIFY                              1
Manufacturer                                Google LLC
ProductCode                                 {7F544E85-3FC4-3F6B-BE1C-679880E73AD3}
ProductLanguage                         1033
ProductName                                Google Chrome
ProductVersion                             67.174.32868
SecureCustomProperties            NEWPRODUCTFOUND;UPGRADEFOUND

 

Notes

Release Notes v75

Chrome Platform Status

Chrome All Features

Admin Insider: What’s new in Chrome Enterprise, Release v75

Chrome Scrubber

 

tags: MrNetTek

Citrix Workspace – 19.5.0.26 (1905)

email me

A new Citrix Workspace client is available here:

https://www.citrix.com/downloads/workspace-app/windows/workspace-app-for-windows-latest.html

 

Size

122 MB


Silent Install

setup.exe /rcu /silent STORE0=”Store;https://mycitrix.umc.edu/Citrix/ummcWeb/discovery;Store”


Silent Uninstall

setup.exe /silent /uninstall

“C:\ProgramData\Citrix\Citrix Workspace 1905\TrolleyExpress.exe” /uninstall /cleanup


Registry

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\CitrixOnlinePluginPackWeb]
“DisplayName”=”Citrix Workspace 1905”
“Publisher”=”Citrix Systems, Inc.”
“UninstallString”=”C:\\ProgramData\\Citrix\\Citrix Workspace 1905\\TrolleyExpress.exe /uninstall /cleanup”
“NoModify”=dword:00000001
“NoRepair”=dword:00000001
“DisplayVersion”=”19.5.0.26”
“DisplayIcon”=”C:\\ProgramData\\Citrix\\Citrix Workspace 1905\\TrolleyExpress.exe”
“Contact”=”Citrix Systems, Inc.”
“HelpTelephone”=”1-800-424-8749”
“URLInfoAbout”=”www.citrix.com”
“URLUpdateInfo”=”www.citrix.com”
“InstallSource”=”C:\\Users\\%username%\\AppData\\Local\\Temp\\Ctx-2513170B-5278-4A41-B5F1-A8E2C32C5B9F\\Extract\\”
“InstallLocation”=”C:\\Program Files (x86)\\Citrix\\”
“EstimatedSize”=dword:000249bf
“VersionMajor”=dword:00000013
“VersionMinor”=dword:00000005

 

Notes

Product Documentation

Citrix moves from Receiver to Workspace

https://www.citrix.com/products/receiver.html


Supported Parameters

/help – Displays this usage information
/uninstall – Removes an existing installation
/silent – Suppresses all graphical user interface
/noreboot – Suppresses all reboots and reboot prompts
/preview – Displays preview of changes without altering the machine
/extract <folder> – Extract self-extracting package to an existing folder
/includeSSON – Installs the single sign-on component for domain pass-through logon
/EnableCEIP – Enables (true) or disables (false) the Citrix Customer Improvement Program (CEIP)
/AutoUpdateCheck – Enables automatic update (auto), enables manual update (manual), bans AutoUpdate (disabled)
/AutoUpdateStream – Specify AutoUpdate stream to be in long term (LTSR) or short term service releases (Current)
/DeferUpdateCount – Specify number of times AutoUpdate can be deferred

MSI property values are supported and must be separated by spaces, e.g.:
PROPERTY=”Value” PROPERTY2=”Value2″

Example silent command-line using all defaults:
CitrixWorkspaceApp.exe /silent

Example command-line specifying multiple options:
CitrixWorkspaceApp.exe /silent ADDLOCAL=”ReceiverInside,ICA_Client,USB,DesktopViewer,Flash,Vd3d,WebHelper,BrowserEngine” INSTALLDIR=”C:\myfolder” ENABLE_DYNAMIC_CLIENT_NAME=”No” CLIENT_NAME=”my_overrided_name” DEFAULT_NDSCONTEXT=”Context1,Context2″

Example command-line to enable domain pass-through:
CitrixWorkspaceApp.exe /silent /includeSSON ADDLOCAL=”ReceiverInside,ICA_Client,SSON,USB,DesktopViewer,Flash,Vd3d,WebHelper,BrowserEngine” INSTALLDIR=”C:\myfolder” ENABLE_DYNAMIC_CLIENT_NAME=”No” CLIENT_NAME=”my_overrided_name” DEFAULT_NDSCONTEXT=”Context1,Context2″

Example command-line to Install Single Sign-On server but to disable capture of logon credentials:
CitrixWorkspaceApp.exe /includesson LOGON_CREDENTIAL_CAPTURE_ENABLE=No [defaults to Yes]

Example command-line to Install Citrix Workspace in NonSelfServiceMode
CitrixWorkspaceApp.exe SELFSERVICEMODE=false [defaults to true]

Example command-line to support upgrade from unsupported version to latest version
CitrixWorkspaceApp.exe /RCU

Example command-line to disable CEIP:
CitrixWorkspaceApp.exe /EnableCEIP=false [defaults to true]

Example command-line to enable manual update:
CitrixWorkspaceApp.exe /AutoUpdateCheck=manual [defaults to auto]

Example command-line to disable auto update:
CitrixWorkspaceApp.exe /AutoUpdateCheck=disabled

Example command-line to choose long term service release stream:
CitrixWorkspaceApp.exe /AutoUpdateStream=LTSR

Example command-line to choose 2 times AutoUpdate can be deferred:
CitrixWorkspaceApp.exe /DeferUpdateCount=2

 

tags: MrNetTek

Slack – 3.4.3

email me

Download

New Slack setup is available here:

https://slack.com/downloads/windows

* note, this application is installed in the Current User security context


Size

78.8 MB


Install

setup.exe


Silent Uninstall

“C:\Users\%username%\AppData\Local\slack\Update.exe” –uninstall -s


Registry

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\slack]
“Publisher”=”Slack Technologies”
“DisplayIcon”=”C:\\Users\\%username%\\AppData\\Local\\slack\\app.ico”
“DisplayName”=”Slack”
“DisplayVersion”=”3.4.3”
“InstallDate”=”20190618”
“InstallLocation”=”C:\\Users\\%username%\\AppData\\Local\\slack”
“QuietUninstallString”=”\”C:\\Users\\%username%\\AppData\\Local\\slack\\Update.exe\” –uninstall -s”
“UninstallString”=”\”C:\\Users\\%username%\\AppData\\Local\\slack\\Update.exe\” –uninstall”
“URLUpdateInfo”=””
“EstimatedSize”=dword:00013883
“NoModify”=dword:00000001
“NoRepair”=dword:00000001
“Language”=dword:00000409

 

Notes


Install Location

C:\Users\%username%\AppData\Local\slack


Hidden options

setup.exe –rerunningWithoutUAC

slack.exe –squirrel-firstrun

slack.exe –type=gpu-process –enable-features=SharedArrayBuffer –gpu-preferences=KAAAAAAAAACAAwBAAQAAAAAAAAAAAGAAAAAAAAAAAAAIAAAAAAAAACgAAAAEAAAAIAAAAAAAAAAoAAAAAAAAADAAAAAAAAAAOAAAAAAAAAAQAAAAAAAAAAAAAAAKAAAAEAAAAAAAAAAAAAAACwAAABAAAAAAAAAAAQAAAAoAAAAQAAAAAAAAAAEAAAALAAAA –service-request-channel-token=15468479350022347369 –mojo-platform-channel-handle=1584 –ignored=” –type=renderer ” /prefetch:2

slack.exe –reporter-url=https://slack.com/apps/breakpad?instanceUid=fe1dd0b6-0a2c-51e2-8682-406c5c3f6bd7&version=3.4.1&channel=prod –application-name=Slack “–crashes-directory=C:\Users\%username%\AppData\Local\Temp\Slack Crashes” –v=1

 

Slack 3.4.3 – June 3, 2019

Bug Fixes

The app was crashing more often than it should have done upon waking. Waking up is hard for all of us, but it shouldn’t have been that hard. It now crashes less often than it did, and we’re continuing to work toward making that “not at all”


Slack 3.4.1 – May 3, 2019

Bug Fixes

We’ve tinkered with the internal workings and polished some rough edges. The app is now better than it was.


Slack 3.4.0 – April 18, 2019

Bug Fixes

Interactions with network drives are now handled with grace and panache. Or, at the very least, “better”.

If you want to launch slack minimized, you now can. We will no longer stand in your way.
We’ve changed the look, feel and texture of our new HTML notifications. Give them a try! They’re delicious.

Sometimes on Windows 10, moving the window, say, up would cause a white bar to appear. We raised the bar.

Also, moving the window would sometimes change the size of the window. Your aim was true; we no longer move the goalposts on you.

In the Apps and Features and Uninstall a Program window, the icon showing up was not the right one. It now is.

The notification and unread indicators on the taskbar are now more readable.
Blurry icons were an issue for some users with multiple displays. Now all is clear.

The Slack icon, previously appearing with an opaque background color on Windows 10 is now all the clearer for being less clear.

Some people were seeing sidebar icons for teams other than the one they were in. This was confusing, and has now stopped.

And finally, if you have been having issues with keyboard or cursor issues, you should no longer be having them.

 

tags: MrNetTek

Windows – Disable Network Adapter Power Management

email me

Take a look at this reg key if your computer is falling off the network during idle time.


HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\

Key: The_Device_Number (will be something like 001, 002, 003, etc.)

Type: DWORD

Value: PnPCapabilities

Data: 24

 

Notes

Disable sleep for everything

powercfg /x -hibernate-timeout-ac 0
powercfg /x -hibernate-timeout-dc 0
powercfg /x -disk-timeout-ac 0
powercfg /x -disk-timeout-dc 0
powercfg /x -monitor-timeout-ac 0
powercfg /x -monitor-timeout-dc 0
Powercfg /x -standby-timeout-ac 0
powercfg /x -standby-timeout-dc 0

 

tags: MrNetTek

Windows – Disable Lock Screen

email me

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Personalization
Type: DWORD
Value: NoLockScreen
Data: 1


Group Policy

Navigate to Computer Configuration > Administrative Templates > Control Panel > Personalization

In the right panel, look for the policy labeled Do not display the lock screen. Double-click on it to see its properties.

Image

Set its value to Enabled. Click Apply and the OK button.

Image

 

tags: MrNetTek

PowerShell – SCCM – Delete Temps on Computer

email me

In SCCM, either add script to Applications, or compile the script into an EXE and add to Packages, and then it can be deployed (deploy as Admin, i.e. System Account).

$ErrorActionPreference= 'silentlycontinue'

$UserProfile = ""

Clear-Host

# Clear Windows Temp

$WinTempLocation = "$env:windir\Temp","$env:TEMP"
$WinTemp = Get-ChildItem $WinTempLocation -Recurse
$WinTemp | Remove-Item -Confirm:$false -Recurse -Force -WarningAction SilentlyContinue -ErrorAction SilentlyContinue


# Clear Software Distribution

$SoftwareDistributionLocation = "$env:windir\SoftwareDistribution\Download"
$SoftwareDistribution = Get-ChildItem $SoftwareDistributionLocation -Recurse
$SoftwareDistribution | Remove-Item -Confirm:$false -Recurse -Force -WarningAction SilentlyContinue -ErrorAction SilentlyContinue


# Clear Temps in each User Profile

Get-ChildItem 'HKLM:\Software\Microsoft\Windows NT\CurrentVersion\ProfileList' |
    ForEach-Object{
        $UserProfile=$_.GetValue('ProfileImagePath')    
        if(
            # skip these profiles
            $UserProfile -notmatch 'Administrator|NetworkService|Localservice|systemprofile'){
            Write-Host "`nPerforming cleanup on: $UserProfile\AppData\Local\Temp" -ForegroundColor green        
                        
            # delete files
            Remove-Item -path "$UserProfile\AppData\Local\Temp\*.*" -Confirm:$false -Recurse -Force -WarningAction SilentlyContinue -ErrorAction SilentlyContinue
            Start-Sleep 3

        }else{
            Write-Host "`nSkipping: $UserProfile" -Fore yellow
            Start-Sleep 3
	    }
    }

$SoftwareDistributionLocation = ""
$SoftwareDistribution = ""
$WinTempLocation = ""
$WinTemp = ""
$UserProfile = ""


Output

 


Notes

XT 256 https://pinetools.com/syntax-highlighter

 

tags: MrNetTek