←November→
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
|
|
Thu, Oct 03, 2024 10:32 pm
Starting the Windows Media Player (WMP) from a command prompt
If you wish to start the
Windows Media
Player (WMP) application from a
command-line
interface (CLI), such as a command prompt window, you can
do so by entering the command
"%ProgramFiles(x86)%\Windows Media
Player\wmplayer.exe"
at a command prompt window (be sure to enclose the
command within double quotes since there are spaces in the
directory path). You might wish to do so if you are logged into
one user account, but wish to open a movie or music file that is
not accesible from the currently logged in user account. If you
wished to run the program from an administrator account, you can
open a command prompt window as
an administrator or you can open a unprivileged command prompt window from
the currently logged in account and then use the
runas /user
command e.g.,
runas /user:username
"%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe"
where
username is the account name for the account from which you wish
to run the program. E.g.,
runas /user:jane "%ProgramFiles(x86)%\Windows
Media Player\wmplayer.exe"
to run the Windows Media Player with Jane's
account privileges. If you need to run the command from a
Windows domain
account, you can use
runas /user:domainname\username
"%ProgramFiles(x86)%\Windows Media Player\wmplayer.exe"
where
domainname is the name of the domain and
username is the
name of the domain user account. Once the Windows Media Player app
is open, you can then hit the
Ctrl-O
keys (the Ctrl
and the letter "O" key) simultaneously to open a window where you can then
browse for audiovisual files in directories to which the other user
account has access.
[/os/windows/software/audio-video/WMP]
permanent link
Wed, Sep 25, 2024 10:17 pm
Viewing network connections on a Microsoft Windows system by protocol
If you just wish to see
TCP ports in use on a Microsoft Windows system,
you can issue the
netstat -a -p TCP
command at a command prompt.
The
-a
parameter specifies all connections and listening
ports should be displayed while the
-p
parameter can be
used to select a
protocol from TCP,
UDP, TCPv6, or UDPv6. If used with the
-s
option to display per-protocol statistics, the protocol
argument may be any of:
IP,
IPv6,
ICMP, ICMPv6, TCP, TCPv6, UDP, or
UDPv6. If you only wish to view IPv6 TCP ports in use,
you can use
netstat -a -p TCPv6
. If you only wish to
see currently established connections, you can
pipe the output of
the
netstat
command to the
find
command. E.g.,
netstat -a -p TCP | find "ESTABLISHED"
. Or, if you wished to
see all of the TCP ports on which the system was listening for a connection,
you could use
netstat -a -p TCP | find "LISTENING"
. If you
wanted to see connections to a particular port, e.g., 22, for Secure
Shell (SSH) connections, you could use
netstat -a | find ":ssh"
, which would show the IP addresses of the remote systems connected
via SSH, or
netstat -a | find ":https"
for
HTTPS connections to web sites. If you wished to see host names rather than IP addresses, you could
add the
-f
option, which displays a
Fully Qualified Domain Name
(FQDN) instead of an IP address for a remote system. E.g.,
netstat -a -f | find ":https"
. Since SSH, HTTP, and HTTPS
use TCP rather than UDP transmissions, you don't need to add the
-p
parameter.
[/os/windows/network]
permanent link
Tue, Sep 24, 2024 8:53 pm
Extracting files from a .jar file with the jar command
If you have a
JAR ("Java archive") file and wish to extract the files contained within
it from a
command-line interface (CLI) on a Microsoft Windows system,
you can do so by
opening a command
prompt window and using the
jar xf filename.jar
command,
where
filename.jar is the relevant .jar file, if you have
the
Java
Development Kit (JDK) installed on the system — the JDK software
can be downloaded for free from Oracle's
Java Downloads
page.
Minecraft uses
.jar files for mods and if you wish to view the models (.json files), textures
(.png files) within a JAR file used by Minecraft, you can use the
jar xf filename.jar
command to see those. If you
copy the .jar file to a directory where you wish to extract its contents
and then run the command from the directory in which the .jar file is located,
you should see a directory named assets
appear beneath which you
can find blockstates
, lang
, models
, and
textures
subdirectories.
The .json files files, such as those you may see in a models/block
subdirectory are
JavaScript Object Notation (JSON)
files, which you can view or edit in a text editor, such as the
Windows Notepad
application. The .png files, which you may see in a textures
subdirectory are Portable Network Graphics (PNG) files, which you can
view or edit in graphics applications such as
Microsoft Paint
on Microsoft Windows systems. You can also use a tool such as
Blockbench to work with the
JSON model files and PNG images.
[/os/windows/software/games/minecraft]
permanent link
Fri, Aug 30, 2024 3:01 pm
Starting the Windows Fax and Scan utility from a command line interface
If you wish to start the
Windows Fax
and Scan program, which allows you to fax or scan documents via a
fax machine or scanner attached to a system running the Microsoft Windows
operating system, from a
command-line
interface (CLI), you can do so by
opening a command prompt window
or a
PowerShell window
and typing the command
wfs
and then hitting
Enter.
There are a few command line parameters you can enter when staring the
program from the command line. E.g., you can enter
wfs /swtich fax
to start the program with its faxing interface;
wfs /switch scan
is the alternative for starting with the
scanning option. Without those, the application will start in the last used
mode. For other possible arguments to the app, see
Windows Fax And Scan Command Line Options?
[/os/windows/utilities]
permanent link
Sun, Jun 30, 2024 9:12 pm
Determining the version of a PDF document
If you have a Portable Document
Format (PDF) file and wish to determine the version of the PDF standard
used for the document, that information is stored in the first line of the
file. You can open the file with a
text editor, such
as the Windows
Notepad application on a Microsoft Windows system and view
the first line to determine the PDF version used for the file.
You will see %PDF-x.y
where x.y is the
version of the PDF standard used in the creation of the file,
e.g., %PDF-1.7
for version 1.7.
On a Microsoft Windows system, you could also open a
PowerShell window (you can type PowerShell
in the Windows Search field and click on the
application when you see it returned in the list of
results) and use the Get-Content
cmdlet
and the -First
parameter followed by the number one.
E.g.:
PS C:\> Get-Content "July 2024 Newsletter.pdf" -First 1
%PDF-1.7
PS C:\>
Related:
-
PowerShell Get-Content equivalents to Linux head and tail commands
Date: March 22, 2024
[/os/windows/PowerShell]
permanent link
Fri, Jun 28, 2024 9:17 pm
Mirroring Disks with Windows Disk Management
I added two Western
Digital 10 TB hard disk drives to a Windows 11 system.
I wanted to have the second hard disk drive (HDD) mirror the first, which
is a
Redundant Array of Independent Disks 1 (RAID 1) configuration. You
can configure Windows to mirror the drives using the Disk Management utility
that comes with the Microsoft Windows operating system. To run the
utility, you can
open a command prompt with
administrator privileges and then type diskmgmt.msc
and hit Enter. You will then see a window showing all the drives
attached to the system. In this case, the new 10 TB drives are shown as
"unallocated", since they have not been partitioned and formatted yet.
[ More Info ]
[/os/windows]
permanent link
Sat, May 25, 2024 10:05 pm
Using MakeMKV for ripping DVDs and for other A/V tasks
If you wish to "rip" a DVD, i.e., create a video file on a disk drive
from the DVD, one free program you can use on Microsoft Windows systems
or Mac OS X systems is
MakeMKV.
The software can also be used to extract a video file from an ISO image of a
DVD.
[ More Info ]
[/os/windows/software/audio-video]
permanent link
Fri, May 17, 2024 3:10 pm
View RDP Firewall Rule using PowerShell
If a Microsoft Windows system is running the
Microsoft Defender
Firewall,
firewall software that comes with Microsoft Windows systems, you can
check on whether connectivity is allowed on a particular
network
port from a
command-line
interface (CLI) using
PowerShell. You can determine whether the Windows Firewall is active on a
system from a command prompt
using the command netsh advfirewall show
currentprofile
. If the value of "State" is "ON", then the Windows
Firewall is active on the system.
C:\>netsh advfirewall show currentprofile
Domain Profile Settings:
----------------------------------------------------------------------
State ON
Firewall Policy BlockInbound,AllowOutbound
LocalFirewallRules N/A (GPO-store only)
LocalConSecRules N/A (GPO-store only)
InboundUserNotification Enable
RemoteManagement Disable
UnicastResponseToMulticast Enable
Logging:
LogAllowedConnections Disable
LogDroppedConnections Disable
FileName %systemroot%\system32\LogFiles\Firewall\pfirewall.log
MaxFileSize 4096
Ok.
C:\>
You can check on whether the firewall is permitting connectivity on a
particular network port, e.g., TCP port 3389 for the
Remote Desktop
Protocol (RDP), from a PowerShell prompt, which you can obtain by
typing powershell
in the Windows "Search" field at the bottom
of the screen and then clicking on Windows PowerShell when you see
it returned by the search function. At the PowerShell prompt, you can issue
the command Get-NetFirewallPortFilter | Where-Object { $_.LocalPort -eq
3389 } | Get-NetFirewallRule
. If you wished to check on whether
firewall connectivity is permitted for some other protocol, substitute
the port used by that protocol, e.g., port 22 for
Secure Shell (SSH)
connections.
[ More
Info ]
[/os/windows/software/security/firewall]
permanent link
Mon, May 06, 2024 10:31 pm
Stopping automatic updates to Microsoft Paint and other Microsoft Store apps
When I sat down at a system running the Microsoft Windows 11 operating
system on Saturday, I saw a message stating that
Microsoft Paint
had updated itself automatically. I had at least a dozen Paint windows open
where I had posted screenshots over the past week for things I wanted to
check later. I had not saved those Paint windows; I had anticipated going
through them on Saturday, extracting information I wanted to keep from some
images and then closing the windows and saving others. But I found
the update had just closed them all without any prompt asking whether
I wanted to save them and without saving the images. So I lost all the
information from them irretrievably. Certainly, I should have saved
the images in those Paint windows or used some other graphics application that
automatically saves the contents of windows for that application or at least
won't automatically update itself without saving any unsaved work, but I'm still
irritated at the mindset of Microsoft developers regarding not caring
about the impact to users if users have unsaved content in Microsoft
applications, in addition to being irked with myself for not saving
the information. I do use Paint a lot for simple graphics tasks, such as
cropping and resizing screenshots, and I don't want it updating itself
without warning when that may lead to a loss of information I haven't yet
saved. You can determine when a Microsoft Store app was last updated and turn
off automatic updates for apps obtained from the Microsoft Store, though
you have to turn off the auto update feature for all apps, since there is
not a way to do it only for a particular app, such as Paint.
[ More Info ]
[/os/windows/software/graphics/mspaint]
permanent link
Mon, Apr 15, 2024 9:01 pm
Calculating a hash value for a file with Get-FileHash
The PowerShell cmdlet
Get-FileHash provides a
cryptographic hash function that will allow you to determine a
hash value of a file on a Microsoft Windows system. By default,
the cmdlet
uses the SHA-256 hash
function, but you can specify other functions, such as
MD5, using the
-Algorithm
parameter. You can change the output to a list
format by
piping the output
of the cmdlet to Format-List
.
PS C:\users\public\downloads> Get-FileHash ".\rel_x64_Xming-7-7-1-1-setup.exe"
Algorithm Hash Path
--------- ---- ----
SHA256 B7B4C0A191E315686A2481DCC8BBB27D6D7A156FBF689768E48CF08207B86560 C:\users\public\downloads\rel...
PS C:\users\public\downloads> Get-FileHash ".\rel_x64_Xming-7-7-1-1-setup.exe" | Format-List
Algorithm : SHA256
Hash : B7B4C0A191E315686A2481DCC8BBB27D6D7A156FBF689768E48CF08207B86560
Path : C:\users\public\downloads\rel_x64_Xming-7-7-1-1-setup.exe
PS C:\users\public\downloads> Get-FileHash -Algorithm MD5 ".\rel_x64_Xming-7-7-1-1-setup.exe"
Algorithm Hash Path
--------- ---- ----
MD5 BA200636A596A84E0877901CE89D1C2E C:\users\public\downloads\rel...
PS C:\users\public\downloads>
[ More Info ]
[/os/windows/PowerShell]
permanent link
Privacy Policy
Contact