Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Sunday, June 04, 2017

Launch Emacs for Windows with Batch File using Emacs Configuration from Cygwin

I maintain a shared Emacs configuration under Linux and Cygwin. In Windows, I wanted to easily launch Emacs from the Desktop with the following goals.

  • Create a shortcut in the taskbar that launches Emacs for Windows
  • Have Emacs for Windows obey the Emacs configuration from Cygwin
  • Avoid opening extra console windows

Some prerequisites,


I created a file called c:\cygwin64\emacs.bat with the following contents.
c:\cygwin64\bin\run bash.exe -c ~/dotfiles/bin/emacs.sh

The file ~/dotfiles/bin/emacs.sh is a shell script that sits in my Cygwin directory. It is a wrapper script that calls Emacs for Windows if I'm running Cygwin.

It is assumed that the default Emacs configuration sits in the ~/.emacs file under Cygwin.

Pin the c:\cygwin64\emacs.bat script to your task bar. See below if you do not know how to do this. Clicking on it will open Emacs for Windows without any intervening console windows.

References

Sunday, July 10, 2016

Web Browsers Prevent System from Going to Sleep

Your web browser may prevent your system from going to sleep. You can override this by running the following commands in an elevated command prompt. Note, the commands below sets the override for Chrome, Firefox, and Edge.

powercfg /requestsoverride PROCESS chrome.exe AWAYMODE DISPLAY SYSTEM
powercfg /requestsoverride PROCESS firefox.exe AWAYMODE DISPLAY SYSTEM
powercfg /requestsoverride PROCESS MicrosoftEdge.exe AWAYMODE DISPLAY SYSTEM

Reference
https://techjourney.net/chrome-prevents-windows-from-going-into-sleep-standby-or-hibernation-mode/

Wednesday, June 29, 2016

Show Workweek in Windows System Tray

T-Clock is a utility that provides a more flexible date and time display in the system tray. It also includes the ability to show the work week.

Download (https://github.com/White-Tiger/T-Clock/releases)

Sunday, September 06, 2015

Remove undeletable partitions on flash cards

There are times when partition manager won't let you remove partitions on a flash card. To remove these partitions, it is necessary to run diskpart.

Invoke diskpart in administrator mode.

diskpart
list disk
select disk X (where X is the disk you wish to clear the partition table)
clean

At this point, you can proceed to create a new partition using diskpart or creating a new partition using the partition manager.

Saturday, December 27, 2014

Thursday, May 01, 2014

Sharing folders in Windows 8

To share folders in Windows 8, you can accomplish this by moving the shared content to the Public folder. It is possible to share content that is not in the Public folder. The following steps below document how to make any folder accessible by another computer on the network.

Right click -> Properties
Select the Sharing tab
Click Advanced Sharing
Select "Share this folder"
Provide a share name and click Add
Press OK
Click Share
In the drop-down box, select Everyone and click Add
Change the Permission Level for Everyone to "Read/Write"
Click Share

Now you should be able to access the share via
\\<computer name>\<share name>

Sunday, March 30, 2014

Avoid security prompts when copying or moving files within your network

Windows may prompt you with a warning when you attempt to copy or move files across systems on your network.

To get around this problem, you will need to tell Windows that the other host computer is a system on your Intranet. Follow the steps below.

Go to Internet Options.
Click on the Security tab.
Select Local intranet and click the Sites button.
Click on the Advanced button.
In the Add this website to the zone: box, type
file://192.168.1.*
click the Add button.

Note: You will need to substitute 192.168.1 depending on your network setup. You may also specify hostnames like file://*.<domainname>.

Thursday, March 14, 2013

Measure USB card speed

It is sometimes necessary to confirm the read and write speed of an USB card. h2testw is such an utility. The author's page is written in German, but you can also read about the tool in English.

Author's page in German (website)
English page (download)

Monday, February 11, 2013

Nonintrusive and customizable screen capture tools

The following are two opensource screen capture tools for Windows. They are very customizable and can be configured to generate captures without any notifications.

Greenshot (website)
ShareX (website)

Saturday, February 02, 2013

Take ownership of files/folders after reinstalling Windows

If you use the NTFS filesystem, you may notice that you may not be able to access certain files or folders after you have reinstalled Windows. This is due to a change in ownership of the files or folders. To gain access again, open the command line with administrator permissions and run the following commands. Note, the takeown command with the /r flag will recursively reassign ownership of all files/folders under the current folder to the current owner.

cd <parent folder>
takeown /r /f .

Tuesday, October 23, 2012

Remap Caps Lock key in Windows

It may be sometimes useful to remap certain keys on your keyboard. The Caps Lock key on the keyboard is not useful to me, and I prefer to remap it as a Ctrl key. This makes Emacs a little easier to use on standard keyboards. It is certain possible to do this in Windows using a free tool from Microsoft. You can find it below.

Windows Server 2003 Resource Kit Tools, requires installation (website)
Windows 2000 Resource Kit Tools, unpacked for standalone download (website)

Saturday, June 16, 2012

Include another folder in your Windows 7 library

The default library in Windows 7 points to a folder in c:/Users/<username>. It is possible to include additional folders as part of the library. Use the following steps to add additional folders to the library.

Open a new folder

In the navigation pane on the left, right click on one of the library folders. Library folders include Documents, Music, Pictures, and Videos. Select Properties when the context menu is displayed. Click on "Include a folder." Navigate to the folder you would like to include and click the "Include folder" button.

If you would like newly created files to be saved to this new location, select one of the folders in the "Library locations" and click "Set save location."

Click the OK button  to apply the new setting.

If you would like to move the contents of your old folder to this new one, manually browse to c:/Users/<username>, and move the files to the new location.

Sunday, May 13, 2012

Identify Windows 7 shares

To identify the list of folders that have been shared on a Windows 7 computer, click the Start button and type "computer management." Select "Computer Management." Once the Computer Management window appears, in the left side window, expand "Shared Folders", and click "Shares." In the main window, the list of folders that have been shared are shown.

Saturday, May 12, 2012

Unobtrusive ISO mounting in Windows

There are many programs available to mount ISO files. Portable WinCDEmu is one that is least obtrusive. There is no setup program. The fist time you run it, it will install the necessary drivers. These drivers can be uninstalled at any time.

Portable WinCDEmu (http://wincdemu.sysprogs.org/portable/)

Thursday, May 03, 2012

Windows system wakes up randomly from sleep

There are times when a system wake ups randomly from sleep. If this happens, open a command terminal and run the following command.

powercfg -lastwake

The output of this command may provide useful information as to why the system woke. If powercfg does not provide anything useful, your system may have woken up from other reasons. If you own a motherboard manufactured by Intel, try disabling the remote wake capability of the Management Engine. Note, this is not related to wake-on-lan. The Management Engine can be accessed by pressing a key during boot. You may have to enable the capability to enter the Management Engine configuration page through the BIOS settings.

Saturday, November 12, 2011

Install Microsoft Windows 7 from a USB flash drive

Create a bootable USB flash drive containing Windows 7 using the Windows 7 USB/DVD Download Tool.

Windows 7 USB/DVD Download Tool (website)

Sunday, November 06, 2011

Install Microsoft Windows XP from a USB drive

The following guide allows you to install Windows XP from a USB flash drive. This is useful if the installation system does not have a CD-ROM or DVD drive. The installation system must support the capability to boot from a USB drive. If you are unsure, check the BIOS settings as well as your computer/motherboard manual. You will need the following.
  • The Windows XP CD
  • A USB flash drive
  • WinToFlash (webpage)
  • A build system with a CD-ROM or DVD drive
  • An installation system that can boot from a USB flash drive
On the build system, insert the Windows XP CD and plug in the USB flash drive. Extract the WinToFlash package, run WinToFlash, and follow the instructions. After the process completes, remove the USB flash drive and plug it into the installation system. Boot from the USB flash drive. If the boot from the USB flash drive is successful, you will be prompted with a list of options. Select the following option to proceed with the installation of Windows XP on the target system. Note, this option is not highlighted by default.
1st, text mode setup (Boot from flash again after finished)
On subsequent boots, the following option should be selected.
2nd, GUI mode setup, continue setup + 1st start of Windows

Sunday, October 23, 2011

Access the administrative share of another Windows 7 computer

Windows has an useful feature that allows one to access the administrative share of a remote Windows system. This capability is disabled by default but it is easily enabled. On the remote Windows 7 system [for other Windows versions], either disable UAC or add the following registry key entry.

Hive: HKEY_LOCAL_MACHINE
Key: Software\Microsoft\Windows\CurrentVersion\Policies\System
Name: LocalAccountTokenFilterPolicy
Data Type: REG_DWORD
Value: 1

On the original host, open a folder and type the following in the location bar.

\\<HOSTNAME>\c$

You will be prompted for the username and password for the remote system. You will now have access to the root folder of the C drive.

Sunday, July 31, 2011

Windows update returns Error Code: 80072EE2

You may receive the following message when performing Windows Update.

Windows Update Error Code: 80072EE2
Windows 7 provides a tool to help resolve this issue. Click the start menu and type "troubleshooting." In the new window that is displayed, click on "Fix problems with Windows Update." After this tool completes, try update again.

You can read more about this from Microsoft on this issue.