Archive for the ‘Batch-Files’ Category
Posted by jpluimers on 2025/01/08
(All below statements were run elevated as Administrator)
I had arp -d fail with any parameter combination on one of my systems always throwing the error The ARP entry deletion failed: The parameter is incorrect..
Luckily I found out that this did clear the ARP cache correctly:
netsh interface ip delete arpcache
I found that via [Wayback/Archive] “The ARP entry deletion failed: The parameter is incorrect.” – Recherche Google:
Read the rest of this entry »
Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 10, Windows 11, Windows 7, Windows Development | Leave a Comment »
Posted by jpluimers on 2024/10/10
A very interesting read, where it keeps me wondering how batch files like these are being generated (making them by hand feels very surreal): [Wayback/Archive] From Highly Obfuscated Batch File to XWorm and Redline – SANS Internet Storm Center
VirusTotal entry: [Wayback/Archive] VirusTotal – File – 453c017e02e6ce747d605081ad78bf210b3d0004a056d1f65dd1f21c9bf13a9a
The day after the article was written, only Kaspersky and ZoneAlarm detected it; in the past ZoneAlarm used the Kaspersky engine, but that stopped a while ago: [Wayback/Archive] ZoneAlarm Free Antivirus Review | PCMag.
The malware uses at least these technologies:
Read the rest of this entry »
Posted in Antivirus, Batch-Files, Development, Power User, PowerShell, Python, Scripting, Security, Software Development, Windows Development | Leave a Comment »
Posted by jpluimers on 2024/10/09
Note that the below methods likely will cause security warnings if a Windows machine has been properly configured, but in most cases at least one of them works.
- using cURL (Widows 10 and up)
curl --url https://speed.hetzner.de/100MB.bin --output %TEMP%\100MB.bin
- using [Wayback/Archive]
certutil | Microsoft Docs (at least Windows 7 and up; needs UAC elevation)
certutil.exe -urlcache -split -f https://speed.hetzner.de/100MB.bin %TEMP%\100MB.bin
- using PowerShell (at least Windows Vista and up)
powershell.exe -Command (New-Object System.Net.WebClient).DownloadFile('https://speed.hetzner.de/100MB.bin','%TEMP%\100MB.bin')
I think it works for all versions of curl, certutil, and PowerShell though I did not have anything older than up-to-date Windows 7 (having PowerShell version 3) and recent to test on.
Read the rest of this entry »
Posted in *nix, *nix-tools, .NET, Batch-Files, CommandLine, cURL, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows 11, Windows 7, Windows 8, Windows 8.1, Windows Development, Windows Vista | Leave a Comment »
Posted by jpluimers on 2024/09/05
Shadow IT has entered the chat
Many companies have hardly any idea how many scripts are being used by their people to get the chores of day to day work done.
Read the rest of this entry »
Posted in Batch-Files, Development, Power User, PowerShell, Python, Scripting, Software Development, Windows, Windows Development | Leave a Comment »
Posted by jpluimers on 2024/07/25
A few years ago I asked for some help figuring out what to whitelist so that winget can update its sources and install packages.
This is how I found out.
The queste started with [Wayback/Archive] Need help trying to figure out what domains/IPs to whitelist for installing packages · Discussion #2304 · microsoft/winget-cli
Read the rest of this entry »
Posted in Batch-Files, Development, Firewall, Fritz!, Fritz!Box, Hardware, Network-and-equipment, Power User, Scripting, Software Development, Windows, Windows 10, Windows 11, winget | Leave a Comment »
Posted by jpluimers on 2024/07/09
Related to WhatsApp Desktop for Mac or PC cannot only chat but also voice and video call: installing WhatsApp from the command-line.
That was easy to do via winget:
c:\temp>winget install -e --id WhatsApp.WhatsApp
Found WhatsApp [WhatsApp.WhatsApp] Version 2.2222.12
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://web.whatsapp.com/desktop/windows/release/x64/WhatsAppSetup.exe
██████████████████████████████ 145 MB / 145 MB
Successfully verified installer hash
Starting package install...
Successfully installed
This was a while ago, so the version number by now is dated, but it is about the command winget install -e --id WhatsApp.WhatsApp
Via:
–jeroen
Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 10, Windows 11, winget | Leave a Comment »
Posted by jpluimers on 2024/05/23
More than a decade ago I wrote about Programmatic alternatives to Windows-L keyboard shortcut (SwitchUser / LockWorkstation).
Still, I see many scripts invoke rundll32.exe or to call the [Wayback/Archive] LockWorkStation function (winuser.h) inside user32.dll. Don’t!
The BOOL LockWorkStation()function has a calling convention that is incompatible with rundll32.exe () which will corrupt the call stack likely will lead to random problems as after two decades, this post from Raymond Chen still holds: [Wayback/Archive] What can go wrong when you mismatch the calling convention? – The Old New Thing
Read the rest of this entry »
Posted in .NET, Batch-Files, C#, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Security, Software Development, Windows, Windows 10, Windows 11, Windows 7, Windows 8, Windows 8.1, Windows Server 2016 | Leave a Comment »
Posted by jpluimers on 2023/10/19
I have had these two batch files on my system forever:
sha1.bat:
:: https://superuser.com/questions/245775/is-there-a-built-in-checksum-utility-on-windows-7
:: https://www.mcbsys.com/blog/2017/03/use-certutil-to-get-file-hash/
:: Windows 7 has case sensitive Hash algorithms: MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512
certUtil -hashfile %* SHA1
sha256.bat:
:: https://superuser.com/questions/245775/is-there-a-built-in-checksum-utility-on-windows-7
:: https://www.mcbsys.com/blog/2017/03/use-certutil-to-get-file-hash/
:: Windows 7 has case sensitive Hash algorithms: MD2 MD4 MD5 SHA1 SHA256 SHA384 SHA512
certUtil -hashfile %* SHA256
But I forgot to blog about [Wayback/Archive] Use Certutil to Get File Hash | MCB Systems mentioning:
on Windows 7, the hash algorithms are case-sensitive. Be sure to type, for example, “MD5”, not “md5”. On Windows 8.1 and 10, case doesn’t matter
I did mention the first link in “error: invalid object 100644” “git svn”, though only in a by-line. So thanks [Wayback/Archive] user64996 for asking and:
–jeroen
Posted in Batch-Files, CertUtil, Development, Power User, PowerShell, Scripting, Software Development, Windows | Leave a Comment »
Posted by jpluimers on 2023/10/16
Be careful phrasing reg.exe commands.
Sometimes it gives you the error ERROR: Invalid key name.
The reason is that the reg.exe is really sensitive on the order of the command-line: the first argument must be a full key, optionally prepended by a computername.
Any other optional command-line option (like /f to force execution without asking) needs to go after that.
See:
–jeroen
Posted in Batch-Files, Power User, Registry Files, Scripting, Windows | Leave a Comment »
Posted by jpluimers on 2023/10/11
I had speedtest-cli running on MacOS and various Linux machines, but not yet on Windows (see for instance my post Ubuntu: Fixing the myserious “Failed to stop apt-daily.timer: Connection timed out”).
[Wayback/Archive] Install and Test Internet Speed with Speedtest CLI Command Line – NEXTOFWINDOWS.COM reminded me there is a Speedtest CLI for Windows download at at [Wayback/Archive] Speedtest CLI: Internet speed test for the command line, but I am a an automation/scripting/devops person, so luckily there are also [Wayback/Archive] Chocolatey Software | Speedtest by Ookla (don’t get [Wayback/Archive] Ookla.Speedtest download, as that is the GUI version).
Both the Chocolatey and winget packages are named the same, so that is quite confusing. This is how I have set them apart:
Read the rest of this entry »
Posted in *nix, *nix-tools, Batch-Files, Chocolatey, DevOps, GDPR/DS-GVO/AVG, Internet, ISP, KPN, Notepad++, Power User, Privacy, Scripting, SpeedTest, Windows, xs4all | 2 Comments »