Batch – Turn Off Computer Screen

email me

This command turns off the computer screen. Tested on a desktop and laptop.

powershell.exe -Command “(Add-Type ‘[DllImport(\”user32.dll\”)]public static extern int SendMessage(int hWnd,int hMsg,int wParam,int lParam);’ -Name a -Pas)::SendMessage(-1,0×0112,0xF170,2)”


Notes

https://social.msdn.microsoft.com/Forums/vstudio/en-US/1bfde62b-fb86-4c63-88b5-a80c87a1ba9f/how-to-correctly-turn-off-monitor-power?forum=csharpgeneral

https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ms704147(v=vs.85)

nircmd.exe cmdwait 1000 monitor off

tags: MrNetTek

SCCM – Agent Will Not Update Client Actions

email me

Many things can cause missing Action functions (like corrupted SMS WMI and network account issues), but…something that may be overlooked is network meter. That’s right, a metered connection will often render unusual, anomalous results with the Software Center and CM agent, depending on how you have the agent configured for users.

You’ll notice, the Client Actions will not update (however, the C:\Windows\ccmsetup\logs\ccmsetup.log will say successfully installed):

 

Checking logs in the C:\Windows\CCM\Logs folder, you’ll see warnings and errors referring to metered network:

 

The fix is to disable metering on the current network connection (which will often be a wireless connection).

Restart computer or the ccmexec service. Monitor the Actions using the CM applet in Control Panel, or navigate to C:\Windows\CCM\Logs and watch logs appear.


Notes

Metered connection settings are stored here

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost

Value 1 = not metered
Value 2 = metered

 

tags: Access metered connection, fix media cost, MrNetTek

Google Chrome – 75.0.3770.80

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{E9C2D426-767C-3B4A-AB86-269970F16716} /qn /norestart


MSI Property Table

UpgradeCode                                 {C1DFDF69-5945-32F2-A35E-EE94C99C7CF4}
AllowDowngradeSubstitution     false
ALLUSERS                                       1
ARPPRODUCTICON                       icon.ico
ARPNOMODIFY                              1
Manufacturer                                 Google LLC
ProductCode                                  {E9C2D426-767C-3B4A-AB86-269970F16716}
ProductLanguage                          1033
ProductName                                 Google Chrome
ProductVersion                               67.174.32848
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

Mac – Error logging into App Store – AMD-Action:authenticate:SP

email me

I came across this error when trying to upgrade from El Capitan to Sierra (setting up a very specific dev environment). Method 1 resolved my issue.


Method 1 (dual authentication issue)

Download something from the app store (a small app) and authenticate.
Try downloading the larger app/OS file now.


Method 2 (date issue)

Command + R at Mac startup to enter Recovery Mode
Utilities > Terminal

date mmddHHMMyy (Pacific Time)
csrutil enable
csrutil clear

Reboot and try downloading the larger app/OS file now.


Method 3 (privilege issue)

Change permission for the Users Shared folder

sudo -s
cd /Users
ls -al
rm Shared
mkdir Shared
chown root Shared
chgrp staff Shared
chmod 775 Shared

Try downloading the larger app/OS file now.

 

tags: MrNetTek

Windows 10 Environment Variables

see Windows Category
 

VARIABLE DETAILS
%ALLUSERSPROFILE% C:\ProgramData
%APPDATA% C:\Users\%username%\AppData\Roaming
%COMMONPROGRAMFILES% C:\Program Files\Common Files
%COMMONPROGRAMFILES(x86)% C:\Program Files (x86)\Common Files
%CommonProgramW6432% C:\Program Files\Common Files
%COMSPEC% C:\Windows\System32\cmd.exe
%HOMEDRIVE% C:\
%HOMEPATH% C:\Users\%username%
%LOCALAPPDATA% C:\Users\%username%\AppData\Local
%LOGONSERVER% \\domain logon server
%PATH% C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%PathExt% .com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc
%PROGRAMDATA% C:\ProgramData
%PROGRAMFILES% C:\Program Files
%ProgramW6432% C:\Program Files
%PROGRAMFILES(X86)% C:\Program Files (x86)
%PROMPT% $P$G
%SystemDrive% C:
%SystemRoot% C:\Windows
%TEMP% C:\Users\%username%\AppData\Local\Temp
%TMP% C:\Users\%username%\AppData\Local\Temp
%USERDOMAIN%  user domain
%USERNAME% user name
%USERPROFILE% C:\Users\%username%
%WINDIR% C:\Windows
%PUBLIC% C:\Users\Public
%PSModulePath% %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\


Notes

https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables

 

tags: Environmental variables, path, MrNetTek

Skype for Desktop – 8.46.0.60

email me

Download

New Skype for Desktop (Windows) is available here:

https://go.skype.com/windows.desktop.download  mirror


Size

60.5 MB


Silent Install

setup.exe /VERYSILENT /SP- /NOCANCEL /NORESTART /SUPPRESSMSGBOXES /NOLAUNCH -ms


Silent Uninstall

“C:\Program Files (x86)\Microsoft\Skype for Desktop\unins000.exe” /SILENT


Registry

“HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Skype_is1”

 

Notes

Disable Skype auto updates

 

tags: Skype automation, Skype scripting, MrNetTek

Google Chrome – 74.0.3729.169

email me

Download

New Chrome browser is available here:

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


Size

55.3 MB


Silent Install

setup.msi /quiet /norestart


Silent Uninstall

msiexec /x{FF358111-357A-39FF-A7D8-331B72176B65} /qn /norestart


MSI Property Table

UpgradeCode                                  {C1DFDF69-5945-32F2-A35E-EE94C99C7CF4}
AllowDowngradeSubstitution       false
ALLUSERS                                         1
ARPPRODUCTICON                         icon.ico
ARPNOMODIFY                               1
Manufacturer                                  Google LLC
ProductCode                                   {FF358111-357A-39FF-A7D8-331B72176B65}
ProductLanguage                           1033
ProductName                                  Google Chrome
ProductVersion                               67.164.16553
SecureCustomProperties              NEWPRODUCTFOUND;UPGRADEFOUND

 

Notes

Release Notes

 

tags: Chrome automation, Chrome scripting, MrNetTek

Mozilla FireFox – 67.0

email me

Download

New FireFox is available here:

https://ftp.mozilla.org/pub/firefox/releases/67.0/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 (x64 en-US)


Notes

https://blog.mozilla.org/blog/2019/05/21/latest-firefox-release-is-faster-than-ever/

https://hacks.mozilla.org/2019/05/firefox-67-dark-mode-css-webrender/

https://threatpost.com/mozilla-tackles-two-critical-flaws-with-firefox-67-release/144961/

 

tags: Firefox automation, Firefox scripting, MrNetTek

C# – Return Lines Matching String

email me

using System;
using System.IO;
using System.Collections.Generic;
using System.Text.RegularExpressions;

class ReturnLines
{
static void Main(string[] args)
{
const string pattern = @"test", filename = @"c:\data.txt";

List<string> lines = GetLinesWithMatch(File.ReadAllLines(filename), pattern);

foreach (var item in lines)
{
Console.WriteLine(item);

}

Console.WriteLine("Press any key to continue...");
Console.ReadKey();
}

public static List<string> GetLinesWithMatch(string[] lines, string pattern)
{
Regex rx = new Regex(pattern);
List<string> matchedLines = new List<string>();
foreach (var line in lines)
{
if (rx.IsMatch(line))
{
matchedLines.Add(line);
}
}

return (matchedLines);
}
}


Output and data.txt file


Notes

https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regex?view=netframework-4.8

 

tags: MrNetTek

Skype for Desktop – 8.44.0.41

email me

Download

New Skype for Desktop (Windows) is available here:

https://go.skype.com/windows.desktop.download  mirror

 

Size

60.2 MB


Silent Install

setup.exe /VERYSILENT /SP- /NOCANCEL /NORESTART /SUPPRESSMSGBOXES /NOLAUNCH -ms


Silent Uninstall

“C:\Program Files (x86)\Microsoft\Skype for Desktop\unins000.exe” /SILENT


Registry

“HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Skype_is1”

 

Notes

Disable Skype auto updates

 

tags: MrNetTek

Google Chrome – 74.0.3729.157

email me

Download

New Chrome browser is available here:

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

 

Size

55.3 MB


Silent Install

setup.msi /quiet /norestart


Silent Uninstall

msiexec /x{6FB6A1BA-8566-38B5-B6CB-DE829DC56ED0} /qn /norestart


MSI Property Table

UpgradeCode                                  {C1DFDF69-5945-32F2-A35E-EE94C99C7CF4}
AllowDowngradeSubstitution       false
ALLUSERS                                         1
ARPPRODUCTICON                         icon.ico
ARPNOMODIFY                               1
Manufacturer                                  Google LLC
ProductCode                                   {6FB6A1BA-8566-38B5-B6CB-DE829DC56ED0}
ProductLanguage                           1033
ProductName                                  Google Chrome
ProductVersion                               67.164.16541
SecureCustomProperties              NEWPRODUCTFOUND;UPGRADEFOUND

 

Notes

Release Notes

 

tags: MrNetTek

Slack – 3.4.1

email me

Download

New Slack setup is available here:

https://slack.com/downloads/windows

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


Size

81.8 MB


Silent Uninstall

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


Install Location

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


Registry

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\slack

 

Notes

Update 5/17/2019 Slack fixes bug that could have let hackers intercept downloads


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.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