MoonPoint Support Logo

 

Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
October
Sun Mon Tue Wed Thu Fri Sat
           
         
2022
Months
Oct


Mon, Oct 24, 2022 10:10 pm

Daily Backup Using Robocopy

I wanted to use Robocopy, to backup a directory on a Windows Server 2022 system to an external USB drive attached to the server every weekday. The server is at a company where employees don't usually work on files at the office on weekends and I create a weekly backup archive on weekends using a different backup method. I opted to use Robocopy since it is a free command-line utility for replicating files and directories that is provided by Microsoft with current Windows operating systems. The directory I want to backup is D:\ACCI and I want to create the backup on the external E:\ drive in the existing directory E:\ACI\Backups\ACCI. I want that backup directory to always mirror the source directory, so any files added during the day should be added to the backup directory when the Robocopy command runs and any files that are deleted from the source directory during the day should be deleted from the backup directory when the Robocopy command runs. I.e., the backup directory should mirror the source directory, so I use Robocopy's /MIR option. The source directory is a directory shared over the local area network (LAN) and it is possible that an employee may leave for the day with one or more files in the shared folder on the server still open. I don't want Robocopy to wait and try again to backup an open file since the script will be running at night at a time employees aren't likely to be still working and so any file that is locked because it is still open will likely remain open until at least the the next day when employees resume work. So I use the /W:0 option to tell Robocopy to immediately retry to backup a file if it encounters a problem (by default it will wait 30 seconds and try again) and the /R:1 option to tell Robocopy to only retry backing up a file once rather than try repeatedly (it will try 1 million times by default). I want to record all output of the Robocopy daily backups in E:\ACI\Backups\RoboCopyBackup.log so I place that output path and filename after >> which will append the daily output to that file—if you just use one greater than sign rather than two, the file will be overwritten each time the Robocopy command runs. So I have the following Robocopy command, which I placed in a file I created with Windows Notepad named Robocopy_Daily_Mirror.bat (when you are saving a batch file in notepad change "save as type" from "Text Documents (*.txt)" to "All Files"):

robocopy D:\ACCI E:\ACI\Backups\ACCI /MIR /W:0 /R:1 >> E:\ACI\Backups\RoboCopyBackup.log

[ More Info ]

[/os/windows/utilities/backup/robocopy] permanent link

Sun, Aug 28, 2022 3:45 pm

Setting the path variable for Java

I had installed Java on a Windows 10 system as part of the installation of the Eclipse integrated development environment (IDE), which did not add the directory where the java.exe and javac.exe executable files were installed. I could temporarily add the directory where Eclipse installed those files to the path environment variable—see Running java from an Eclipse installation from the command line—but I didn't want to continue to have to do that every time I wanted to compile a Java program at a command prompt or run one from a command-line interface (CLI). So I added the path to the executable files to the system-wide path environment variable so it would be permanent and apply to all accounts on the system.

[ More Info ]

[/languages/java] permanent link

Sun, Aug 28, 2022 1:47 pm

Setting JAVA_HOME for Gradle

While trying to set up Gradle, a software develpment build automation tool, on a Microsoft Windows 10 system, when I ran the gradle.bat file in the gradle bin directory, I saw the message below:

C:\Users\Jim\Downloads\gradle-7.5.1-bin\gradle-7.5.1\bin>gradle.bat

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

C:\Users\Jim\Downloads\gradle-7.5.1-bin\gradle-7.5.1\bin>

I had installed Java with the Eclipse integrated development environment (IDE) previously and the java.exe executable was installed beneath the C:\Users\Jim\.p2\pool\plugins\org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_18.0.1.v20220515-1614\jre\ directory, so I created a JAVA_HOME environment variable pointing to that directory that applied to all accounts on the system. You can create a temporary JAVA_HOME environment variable for the account under which you are currently logged in from a command line interface (CLI) as noted at Running java from an Eclipse installation from the command line, but I wanted to create a permanent environment variable so I typed advanced system settings in the Windows "Type here to search" field and then clicked on View advanced system settings when I saw that listed.

[ More Info ]

[/languages/java] permanent link

Sun, Aug 14, 2022 10:01 am

Excel Proper Case

I inherited an Excel spreadsheet containing names and addresses for all the members of an organization where all the letters for the names and addresses were capitalized. I wanted to convert the names and addresses to "proper case" where only the first letters of names, streets, and cities are capitalized (in the Python programming language proper case is known as "title case"). Fortunately, Excel provides a function, propercase, to perform that function. To perform the conversion, I inserted a new column to the right of each of the columns where all uppercase letters were used. The first column in the Excel workbook contained the last names for the members. There was a header titled "Last Name" in cell A1 with the first person's last name appearing in cell A2, so in the newly inserted column, B, I put =proper(A2) in cell B2. When I hit Enter, instead of AIKIN, JR in A2, I then had Aikin, Jr in B2. I then clicked in cell B2 and dragged the mouse pointer downwards to the last row containing a member's contact information, which resulted in all the members last names being placed in column B with the proper case, i.e., uppercase letters for the first letter of the name and lowercase letters for the rest of the name. I couldn't just delete column A then, which would cause a #REF! message to appear in column B for every name, since I was using a formula that depended on a value being in column A. So, instead, I copied all of column B by clicking on the B at the top of the column to highlight all entries in the column. I then used the Ctrl-C keys to copy all of the entries. I then needed to paste the values in column B into column A, rather than pasting in the formulas. You can do so, by right-clicking on the column designator letter, i.e.the A for column A in this case, and then choosing the appropriate paste option, To paste just the values and not the formulas and formatting, you can click on the icon of a clipboard with "123" on it.

Excel Paste Options

Or you can select Paste Special and then click on the same icon that appears beneath Paste Values.

Excel Paste Special

Once you've pasted the values that are in proper case, you can delete the column, e.g., B in this case, where the formulas are used.

Note: for addresses with Post Office boxes, any instance of "PO BOX" would be replaced with "Po Box," but you can use Excel's find and replace feature to search for all instances of "Po Box" and have it replace all those occurences with "PO Box".

[/software/office/excel] permanent link

Sat, Aug 13, 2022 6:39 pm

PeaZip temporary file location when creating an archive file

I hadn't used PeaZip as a backup utility previously, but after reading about the program, I thought it would be well-suited to copy a directory containing about 37 GB of files on a Microsoft Windows Small Business Server (SBS) 2003 server to an external USB drive so that I could transfer the directory, which was shared over the network from the server, to the new 2022 server I was setting up to replace the outdated server. I downloaded the portable version, PeaZip Portable to a USB flash drive and when I started the program, I specified the external USB drive as the location for the .tar archive I wished to create, but when the PeaZip program showed it was progressing with the backup, I did not see the archive file on that external drive. After some time wondering whether PeaZip was actually creating the tar file, I wondered whether it might be creating a temporary file elsewhere, so from a command prompt, I checked the location Windows was using to store temporary files for the account I was using with echo %temp% and, when I checked that location, found a .tar.tmp file that PeaZip was using for the ongoing archive process. Unfortunately, that temporary file was in a directory on drive C that I knew did not have enough free space left to accomodate the archive file as PeaZip progressed further, so I had to delete a lot of files from that drive and mover others there so that I would not have to restart the archive process.

C:\>echo %temp%
C:\DOCUME~1\ADMINI~1.MAY\LOCALS~1\Temp

C:\>cd %temp%

C:\DOCUME~1\ADMINI~1.MAY\LOCALS~1\Temp>dir *.tar.tmp
 Volume in drive C has no label.
 Volume Serial Number is E88C-7773

 Directory of C:\DOCUME~1\ADMINI~1.MAY\LOCALS~1\Temp

08/12/2022  11:14 PM     5,569,092,608 Andy_2022-08-12.tar.tmp
               1 File(s)  5,569,092,608 bytes
               0 Dir(s)  33,934,786,560 bytes free

C:\DOCUME~1\ADMINI~1.MAY\LOCALS~1\Temp>

When PeaZip concluded the archive process, it moved the temporary file to the location I specified with the .tmp extension now removed, but now I know I need to ensure that the location specified with the Windows %temp% environment variable for a site has enough free space to accomodate the archive file before using PeaZip to create a .zip, .tar, etc. file archive.

[/software/archiving/PeaZip] permanent link

Fri, Aug 05, 2022 5:01 pm

Running java from an Eclipse installation from the command line

For an introductory Java class I am taking, I installed the Eclipse integrated development environment (IDE) on a Microsoft Windows 10 system. In addition to compiling and running Java programs through the IDE, though, I wanted to compile Java programs using the Java compiler, javac.exe, and run them using java.exe from Windows' command-line interface (CLI). The installation process for Eclipse installed the javac.exe and java.exe executables in a user directory with a long directory path to those executables. Note: you should install the Eclipse IDE from the account which you wish to use to compile and run java programs. The location wasn't added to the path environment variable, so if you try to run the programs from a command prompt, you will see the following, unless you specify the full path name where the executable files are located.

C:\Users\Jim>java
'java' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Jim>javac
'javac' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Jim>

I didn't want to have to copy and paste the full path on the command line or type it in every time I wanted to use the two executables from the command line. To avoid that problem you can add the directory path to the path environment variable through a set path= command or create another environment variable, e.g., JAVA_HOME that points to the directory where the two files are located, though both methods apply only to a particular command line instance. I.e., if you close a command prompt window where you've set one of the variables to include the location where Eclipse installed java.exe and javac.exe then open another command prompt window, you will have to set the environment variable again in the new instance. An alternative way to make a permanent path change from a command prompt interface is to use the Windows setx command, though I would not recommend it, since if your path variable already has a path that is more than 1,024 characters long, setx can truncate the path to 1,024 characters, so that you not only don't get the additional directory added to the path, but you may lose some of the path setting you had prior to issuing the command. If you want to make a permanent change, see responses to the "Overcoming the 1024 character limit with setx" posting at the superuser.com site.

[More Info ]

[/languages/java/eclipse] permanent link

Mon, Jul 11, 2022 9:08 pm

Enabling Wake on LAN (WoL) on a Dell PC with a Realtek PCIe GBE NIC

Computers that support the Wake-on-LAN (WoL or WOL) standard can be awoken from a sleep state by sending a "magic packet" to their network card from another system. For an Ethernet card, the packet is an Ethernet frame that is sent to all systems on the local area network (LAN). The packet contains 6 bytes of the hexadecimal value FF followed by 16 repetitions of the 48-bit media access control (MAC) address of the system to be awakened from a sleep state. I tried unsuccessfully on Friday to remotely "wake" a Dell PC from another PC by connecting to the other PC on the same LAN and then sending a magic packet to the sleeping computer using the Wake-on-LAN program from www.matcode.com—I no longer see a download link for the free software for Windows systems on the developer's website, but you can download it from a snapshot of the site taken by the Wayback Machine on December 19, 2007 at Wake-on-LAN where you can also find the utility MCGETMAC.EXE that will allow you to obtain the MAC address for a network interface card (NIC) on another computer, or you can download WakeMeOnLan, another free program for Windows systems created by Nir Sofer. After the user powered on her Dell computer this morning and left the office, I connected to her system remotely to verify that the system is configured to respond to a magic packet to wake it when it is sleeping.

[ More Info ]

[/network/wol] permanent link

Fri, Jun 24, 2022 10:22 pm

Raising a number to a power in Microsoft Excel

There are two ways to use exponentiation, i.e., to raise a number to a power in the Microsoft Excel spreadsheet program. You can use the POWER(number, exponent) function, e.g., to raise 2 to the power 3, you could put =POWER(2,3) in a cell which would yield the value 8. Or you can use the exponent operator, the caret character, i.e., ^ (shift-6 on a Windows keyboard). E.g., to calculate 2 raised to the power 3 you could put =2^3 in a cell which produces the value 8.

[/software/office/excel] permanent link

Thu, Jun 23, 2022 9:46 pm

Maximum memory for an HP 3047h Motherboard

A family member said a Windows 10 system she is using for gaming is running slowly and inquired about adding additional memory to the system. I didn't know the model of the motherboard in the system nor the maximum amount of memory it could accomodate. Rather than opening up the desktop system, I checked on the manufacturer and model of the motherboard from a command-line interface (CLI) with a Windows Management Instrumentation Command-line (WMIC) command and found it was a Hewlett-Packard (HP) 3047h motherboard.

Microsoft Windows [Version 10.0.19043.1766]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Colleen>wmic baseboard get product,manufacturer,model,serialnumber,version
Manufacturer     Model  Product  SerialNumber  Version
Hewlett-Packard         3047h    MXL11925F3


C:\Users\Colleen>

I also saw 3047h listed as the "baseboard product" ("baseboard" is another name used for "motherboard") when I typed System Information in the Windows "Type here to search" field and selcted that application.

[ More Info ]

[/pc/hardware/motherboard/3047h] permanent link

Wed, Jun 22, 2022 9:49 pm

Excluding a file or directory from monitoring and scanning by Acronis Cyber Protect Home

Because Acronis® Cyber Protect Home Office, which is backup, cloning, and antivirus software for Windows and macOS systems, was prompting a user as to whether Java should be allowed to run on a Microsoft Windows system on which it was needed, I wanted to exclude the Java.exe program from monitoring. The process to exclude a program from monitoring and scanning by that application is as follows:
  1. Start Acronis Cyber Protect Home Office. When prompted "Do you want to allow this app to make changes to your device?" to allow CyberProtectHomeOfficeLauncher.exe by the verified publisher Acronis International GmbH to run, choose "Yes."
  2. Select Protection, if it is not already displayed.

    Acronis Cyber Protect - Protection

  3. Click on Protection Exclusions then click on Add exclusion and choose either Add file or Add folder depending on whether you wish to exclude either an individual file or an entire directory from being scanned and possibly flagged.

    Acronis Cyber Protect - Protection Exclusions

  4. When you select an option, e.g., Add file, you can browse to the relevant locaton and select what you wish to exclude from monitoring and scanning activities.

    Acronis Cyber 
Protect - Java Excluded

  5. Click on Save to have the application keep the changes you've made.

[/software/backup/acronis] permanent link

Tue, Apr 05, 2022 6:05 pm

Let's Encrypt Problem binding to port 80: Could not bind to IPv4 or IPv6

A couple of users notified me that they were receiving warning messages regarding the security certificate on their email server when they were checking email with Microsoft Outlook. I checked the expiration date on the security certificate for the email server with the OpenSSL command openssl s_client -connect pop3.moonpoint.com:995 (the system is using Dovecot, which is an open-source IMAP/POP3 software program providing users with the ability to download their email). Dovecot listens on TCP port 995 for POP3S secure email connections for downloading email. I could see the certificae was expired and I issued the quit command when I saw the "OK Dovecot ready" prompt. The email security certificate on the system is provided by Let's Encrypt, so I then tried renewing the certificate from the root account with the letsencrypt renew command, but was unsuccessful. I found the solution was to stop the Apache web server software running on the system, thanks to a post by JuergenAuer at Renewing certificate getting error: Problem binding to port 80: Could not bind to IPv4 or IPv6. After I stopped the web server software, I was able to reissue the letsencrypt command to renew the certificate without the "Problem binding to port 80" error message. I then restarted the Apache web server software and Dovecot.

[ More Info ]

[/security/encryption/openssl] permanent link

Tue, Mar 29, 2022 9:42 pm

Close Microsoft News and Interests Popup

On a Microsoft Windows 10 system, unless the News and Interests feature has been disabled, you will see an area at the bottom right of the screen in the notifications area, aka status area, of the taskbar displaying information about the weather, such as the local temperature where you live.

You can click on that area to view the titles of news articles deemed of interest to you. When you click on it, you will see something similar to what is displayed in the image below.

Popup - News and Interests

If you click outside of the area, the area that pops up with the news articles will normally go away, but sometimes it will remain and won't go away if you click elswhere, hit Escape, click on the refresh icon in the area, etc. There is an option to disable the News and Interests display, which you can get to by right-clicking on the area where the temperature is displayed. But if you do that when the popup display for News and Interests is stuck on the screen then you can't see the options area to disable it because it is behind the area where the News and Interests appear and is thus inaccessible. In such cases, I've found that changing the display settings and then reverting the settings to what they were resolves the problem. You can get rid of the News and Windows popup display by the following steps:

  1. You can hit the Windows key (the one with the Windows symbol on it, which may be on the left side of your keyboard between the Ctrl and Alt keys, to display the desktop. Or, alternatively, you could manually minimize all open windows.
  2. Right-click on an open area somewhere on the desktop and select Display Settings. If the Display Settings window isn't fully visible when you do so, drag that window into a position where you can see the settings.
  3. Change the display resolution.
  4. When asked whether you wish to keep the new resolution or revert to the prior resolution, choose Revert.

The News and Interests display should then disappear. You should be able to click on it again, though, if you want to see the latest news headlines, but have it go away when you click elsewhere.

[ More Info ]

[/os/windows/win10] permanent link

Fri, Feb 04, 2022 3:27 pm

Evernote - Clipper has encountered an error

Recently, when I've tried to save a webpage to Evernote in the Brave web browser, I frequently see the message "Clipper has encountered an error" with "Unknown error occurred. UNK."

Clipper unknown error

I have been able to save the page by disabling and then re-enabling the Evernote extension in the browser. In the Brave Browser, you can do so by closing the error message window, then clicking on the icon of 3 short horizontal bars at the upper, left-hand side of the Brave window which will display a menu of options. Select "extensions" and then click on the red slider button at the bottom, right-hand side of the Evernote Web Clipper extension to turn it off (it will go from red to gray).

Evernote Web Clipper
Extension

Then click on it again to re-enable the extension. You can then close the Brave extensions tab (brave://extensions). You will then need to refresh the page. After I've disabled and re-enabled the extension when I've seen the error message, I've then been able to click on the icon for Evernote near the browser's address bar and save webpages to Evernote.

[/network/web/browser/brave/evernote] permanent link

Sat, Jan 22, 2022 10:37 pm

AMD FX-6350 Six-Core Processor and Windows 11

When I went to Settings then Update & Security on a computer running Microsoft Windows 10 to update it to Windows 11, I saw the message "This PC doesn't currently meet the minimum system requirements to run Windows 11" and "Get the details and see if there are things you can do in the PC Health Check app." So I clicked on the " Get PC Health Check" link and downloaded and installed the application. When I ran the program, it reported "This PC doesn't currently meet Windows 11 system requirements" and provided details as to why that assessment was made. The system has adequate memory, disk space, and a 3.9 GHz processor (the minimum processor speed required is 1 GHz) with 3 cores (2 or more are required), but there was a warning that "This PC must support Secure Boot" and "TPM 2.0 must be supported and enabled on this PC." Secure Boot is a Unified Extensible Firmware Interface (UEFI)" specification. The system is configured for UEFI booting but, even if it wasn't, the October 11, 2021 article How to Install Windows 11 on Legacy BIOS without Secure Boot or TPM 2.0 by Parth Sawhney provides a workaround for systems booting from Basic Input/Output System (BIOS), which UEFI replaced.

PC Health Check - Requirements not met

But the indication that the AMD FX™-6350 Six-Core Processor was not supported seemed a showstopper. I also checked the June 29, 2021 List of Intel and AMD Processors NOT Supported by Windows 11 by Shivam Malani and found the FX-6350 processor is also listed there. The author of that article notes “there’s an endless list of processors that Windows 11 doesn’t support. Even systems capable of flawlessly running high-end games aren’t eligible for Windows 11 due to the limited hardware support” and states that if a system is more than four years old that it is very less likely to be among systems that can be upgraded to Windows 11. A list of Advanced Micro Devices (AMD) processors supported in Windows 11 can be found in the December 2, 2021 article Windows 11 supported AMD processors on the Microsoft Docs website.

You can obtain brief details on a system's processor through Windows Management Instrumentation Command-line (WMIC) at a command prompt inteface.

C:\>wmic cpu list brief /format:list


Caption=AMD64 Family 21 Model 2 Stepping 0
DeviceID=CPU0
Manufacturer=AuthenticAMD
MaxClockSpeed=3900
Name=AMD FX(tm)-6350 Six-Core Processor
SocketDesignation=CPU 1




C:\>

You can check the full details on a processor from a command-line interface (CLI) with wmic cpu list /format:list.

[/os/windows/win11] permanent link

Mon, Jan 17, 2022 10:09 pm

Western Digital My Book disk drive P/N WDBBGB0080HBK-NA Adapter

I found a Western Digital 8 TB My Book external USB disk drive with part number WDBBGB0080HBK-NA in a box with a number of other disk drives, but the box did not contain the power adapter for that drive. The back of the drive has "12V" next to the place where the power adapter connects to the drive but no indication of the amps needed. You can find a listing of the specs for power adapters needed for various disk drives at Western Digital's Power Adapters for WD Products webpage. That page shows that the My Book drives with the following part numbers use AC adapters that are 12 volts, 1.5 amps, and 18 watts.

WDBBGB0030HBK
WDBBGB0040HBK
WDBBGB0060HBK
WDBBGB0080HBK

Note: you can find an explanation of the format Western Digital uses for their model numbers in the PDF file downloadable from Western Digital at Model Numbers - Branded Products or here. For older drives, Western Digital also provides a Retired Model and Order Number Formats for WD Products document that is also available here.

In this case, the "0080H" indicates the drive is a 3.5" drive with a capacity of 8TB.

I didn't have a power adapter from another Western Digital drive handy that met the required specifications for volts, amps, and watts. I could order a needed adapter online—the WD 18-watt power adapter is model number WDPS037RNN while the 36-watt version is model WDPS039RNN—from Amazon and receive the adapter in just a few days, but I needed to check on whether that particular drive held a needed backup immediately. I had a Seagate Backup Plus 5 TB USB 3.0 Desktop Drive available with an ADS-18E-12N power adapter which lists an output of 12V and 1.5A on the adapter, so I figured I could use that drive, since though that adapter doesn't list the wattage, the formula to calculate watts if the amperage and voltage are known is amps x volts = watts and 12 x 1.5 = 18 (Obtain Watts from Amps and Volts provides an online converter). So I was able to use the Shenzhen Honor Electronic Co. ADS-18E-12N adapter from the Seagate drive on the Western Digital drive. Unfortunately, though it held a backup for the system for which I needed to recover files, that backup did not contain the needed files.

References:

  1. Specs of the WD Essential Power Adapter
    By Dan Ketchum
    CHRON

[/hardware/power/adapters/wdc] permanent link

Tue, Jan 04, 2022 8:33 pm

Importing Total Uninstall monitored installation data from version 6 to 7

I use Total Uninstall to track files added, deleted, and modified and registry changes made to systems running Microsoft Windows when I install new software on the systems or update existing software on the systems. The sofware also provides a capability to transfer software from an old PC to a new PC. I upgraded Total Uninstall on a Windows 10 system from version 6 to the latest version, 7.0.1. When I started version 7, it did not appear to incorporate any of the data regarding software installed with Total Uninstall version 6. In the Documentation area of the website, I saw upgrade instructions to "Import the monitored programs into version 6" that show how one can import data for recorded installations from versions prior to version 6 into version 6 by selecting "File" then "Import." But I didn't see any "Import" option for version 7.0.1. After checking the menu options, though, I found that if I clicked on "Modules" from the menu bar at the top of the Total Uninstall window and then selected "Monitored Programs," that an "Import" option was then visible under the "File" option on the menu bar. When I clicked on "Import" all of my prior monitored installations appeared beneath "Monitored programs."

Total Uninstall stores the data for programs installed under its monitoring in .tun files. The data for version 6 is placed in C:\ProgramData\Martau\Total Uninstall 6\Monitored Programs while the data for version 7 is placed in C:\ProgramData\Martau\Total Uninstall 7\Monitored Programs. After I imported the data from version 6 into version 7, I saw that a host of .tun files now appeared in the version 7 Monitored Programs directory with "IMPORTED@" prepended to the file names, e.g., IMPORTED@SpeedFan 4.52.tun for the SpeedFan 4.52.tun file in the version 6 Monitored Programs directory.

[/os/windows/utilities/sysmgmt] permanent link

Mon, Jan 03, 2022 10:03 pm

Running an application under another account on a Windows system with runas

If you are logged into a system running the Microsoft Windows operating system and wish to run an application, e.g., Microsoft Outlook, under another account other than the one you are currently logged in under without switching to that other account, you can run the application as the other user using the runas command from a command prompt. If you don't know where the application is located on the system, you can find its location from a command prompt by changing the directory to the root directory of the drive where applications are stored, which is typically drive C:, then use the /s option of the dir command to search all subdirectories for the program, e.g., outlook.exe, which is the executable file for Microsoft Outlook.

C:\Program Files\Microsoft Office>cd \

C:\>dir /s outlook.exe
 Volume in drive C has no label.
 Volume Serial Number is 9420-A68C

 Directory of C:\Program Files (x86)\Microsoft Office\Office14

03/16/2021  12:41 AM        15,794,840 OUTLOOK.EXE
               1 File(s)     15,794,840 bytes

 Directory of C:\Windows\Installer\$PatchCache$\Managed\00004109D30000000000000000F01FEC\14.0.4763

03/23/2010  12:57 PM        15,889,248 OUTLOOK.EXE
               1 File(s)     15,889,248 bytes

     Total Files Listed:
               2 File(s)     31,684,088 bytes
               0 Dir(s)   3,328,741,376 bytes free

C:\>

In the example above, the program is located in the C:\Program Files (x86)\Microsoft Office\Office14 directory, so I can start the application as the user jdoe in the Windows domain Mordor with the command below (enclose the directory path and application name in double quotes if there are spaces in the directory path):

C:\>runas /user:mordor\jdoe "C:\Program Files (x86)\Microsoft Office\Office14\Outlook.exe"
Enter the password for mordor\jdoe:
Attempting to start C:\Program Files (x86)\Microsoft Office\Office14\Outlook.exe as user "mordor\jdoe" ...

C:\>

If the account under which I wanted to run Outlook is not in a Windows domain, but is, instead, an account on the same computer, I could omit the domain specification and just use /user:jdoe. You can also use the format user@domain, e.g., jdoe@mordor.lan, instead of the format domainname\username. To run a program as another user, you will need to know the password for the other account. In this case, the graphical user interface (GUI) for Outlook will open with the email, calendar entries, tasks, and contacts for the domain jdoe account once the password for that account is provided.

[/os/windows/commands] permanent link

Sat, Jan 01, 2022 10:33 pm

Setting the date and time on a Cisco switch

When I logged into an old Cisco 2950 network switch today and checked the time on the switch, I found the date was July 29, 1993 rather than January 1, 2022.

Hoggle>show clock
*23:47:16.884 UTC Thu Jul 29 1993
Hoggle>

A show clock detail command revealed there was no time source set for the switch.

Hoggle>show clock detail
*23:49:39.464 UTC Thu Jul 29 1993
No time source
Hoggle>

To set the time, I turned on the ability to enter privileged commands with the enable command.

Hoggle>enable
Password:
Hoggle#

I set the date and time to the current Coordinated Universal Time (UTC) values with the clock set command. You can find the current UTC time at Current UTC, Time Zone (Coordinated Universal Time).

Hoggle#clock set 02:47:10 jan 2 2022
Hoggle#show clock
02:47:20.163 UTC Sun Jan 2 2022
Hoggle#

The format of the command is clock set [hh:mm:ss] [month] [day] [year] with the following permissible values:

  1. hh:mm:ss - Specifies the current time in hours in military format, aka 24-hour clock format, minutes, and seconds. So the value for hours can range from 0 to 23 while the values for minutes and seconds can range from 0 to 59.
  2. month - Specifies the current month using the first three letters of the month name. The range is from Jan (January) to Dec (December).
  3. day - Specifies the current day of the month from 1 to 31
  4. year - Specifies the current year as a 4-digit year. The range is from 2000 up to 2037.

You may prefer to have the time displayed in your local time. This switch is in the Eastern Time Zone of the United States (you can see the current time for U.S. time zones at UNITED STATES TIME ZONES), so the local time is currently 5 hours behind UTC time. To display the time in the local time zone, I entered the configure terminal command to enter the Global Configuration context and then specified the timezone as EST and indicated it is minus 5 hours from UTC time.

Hoggle#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Hoggle(config)#clock timezone EST -5
Hoggle(config)#

The format for the command is clock timezone [zone] [hours-offset] [minutes-offset]. The options for the command are as follows:

  1. zone - The acronym of the time zone, which can be up to four characters in length.
  2. hours-offset - The hours difference from UTC. The range is from -12 to +13.
  3. minutes-offset - (Optional) The minutes difference from UTC. The range is from 0 to 59.

You can exit the Global Configuration context with Ctrl-Z. If you then issue the show clock command you should see the date and time matching your local time.

Hoggle(config)#^Z
Hoggle#show clock
22:17:01.987 EST Sat Jan 1 2022
Hoggle#

[/hardware/network/switch/cisco] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo