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

Monday, 20 August 2012

Make a Symbolic Link on Windows XP

I found out on Friday to make a symbolic link with Windows XP, you need to download a special utility.



Get Junction from Microsoft here.



To create a link use the following syntax:

junction <link> <path>

for example

junction c:\progs c:\Program Files

Friday, 17 August 2012

Mac and Windows Native App Packaging for Java and JavaFX

Duke WavingWith the release of Java 7 u6, native packaging support for Windows and Mac Java FX applications is available to everyone. This is totally awesome and I plan to dive in, but haven't yet. But don't wait for me, here are the details so you can get started.



For Mac OS X packaging, here are the details:



And for Windows, check out Igor's original post:

Igor's Packaging Blog Post

Monday, 23 July 2012

Internet Usage by Operating System

Internet IconI found this interesting so I thought I would share:

Usage share of Operating Systems



For my next project at work, I was wondering what operating system to use for any activities. The original course, which this content is based off of, was written for Solaris. But I can't imagine most potential students would have that. So one way of determining operating system usage is to look at statistics gathered by browsers. So the link shows that data for Wikipedia and some other sites that gather these sort of statistics.



Some observations:

  • Windows usage is still around around 70% with most users on Windows 7 and XP.

  • iPhone plus iPad plus Android share is already over 10%. Smaller than I thought it would be, but if you think world wide usage it makes a lot of sense. Smart phones and tablets are just beginning to penetrate everywhere. And tablets are really gonna take off with 7" form factors and $200 list prices like the Google Nexus 7.

  • Mac OS X combined with Linux is only around 10%.

As another data point, I looked at the stats from one of my web sites (abbeyworkshop.com) to see what the geeks are using during the last year. Windows is still strong at 62%, but Mac OS X plus Linux jumps up to 36%. Way to go geeks!



Anyway, it looks like Windows 7 and XP are still my primary targets. But maybe I should think about Linux in the future.

Thursday, 19 April 2012

Windows Equivalent of Grep

Microsoft Logo

I have been looking for a Windows equivalent for the Unix grep utility for some time. Only recently have I find the solution, it seems Google search has been leading me astray! :)



The command is:

findstr



and it has been available since Windows XP.



For example if I wanted to search all the .java files in the current directory and all sub-directories for "Class" I would use the following command.

findstr /s /n "Class" *.java



The /s switch searches all sub-directories. The /n switch displays the line number where the match was found. If a match is found, the file name and path is also displayed.



As another example, if I wanted to do a case insensitive search I would use:

findstr /s /i /n "Class" *.java



The command also supports regular expressions so you can make your searches as complex as you want.

Tuesday, 13 March 2012

Windows DNS Tricks


Microsoft Logo

Did you know you can view your Windows DNS cache? You can very easily with the following commands. Note that on Windows 7 or Vista, you must open your command prompt as Administrator for this to work. You can do this by right clicking the Command Prompt icon and selecting Run as Administrator.



To view the DNS cache type:

ipconfig /displaynds



This prints a lot of information for each entry. To just see the host names try:

ipconfig /displaydns | find "Record Name"



To search the for just the .com host names try:

ipconfig /displaydns | find "Record Name" | find ".com"



To clear the DNS cache use:

ipconfig /flushdns

Tuesday, 7 February 2012

Combine Multiple Commands on one Line with Windows

Microsoft Logo

Can you combine multiple command one one line with a Windows command prompt? You bet.



Just separate each command with a semicolon (;) and precede the command with two ampersands (&&).



For example, the following line performs three directory listings with one command line:



dir;&&dir /w;&&dir /b

Monday, 6 February 2012

No Start Button for Windows 8

Microsoft Logo

According to this CNET story, Windows 8 will not have have a start button:



Microsoft Removes Start Button from Windows 8



Instead, the lower left corner will be hot and will popup the menu.



I don't know about some of this stuff. Microsoft seems to be really emphasizing a touch interface. But 99% of their customers use desktops and that does not seem likely to change any time soon. Looks like another Vista disaster is on the way. At least we can live with Windows 7 while Microsoft figures things out.


Monday, 9 January 2012

Collapse and Expand threads with Thunderbird

Firefox LogoHere is a quick Thunderbird tip. My inbox has been annoying me lately because I can't read collapsed threads. Did you know Thunderbird has keyboard shortcuts for expanding and collopasing threads? Me neither.



To expand all threads, click the astericks key (*). To collaps all threads hit the backslash key (\).

Thursday, 25 August 2011

Simple Command Line File Search with Windows XP and 7

Microsoft Logo

Ever want to do a really simple file search in Windows? Do you find the Windows graphical search tools difficult to use and unreliable?



Well fear not. You can use the Windows command line and the dir command to do most file searches.



To open a command prompt window:

On Windows XP: Start --> Programs --> Accessories --> Command Prompt

On Windows 7: Start --> All Programs --> Accessories --> Command Prompt



Now you can use the cd command to move around your disk.

To move up 1 directory level: cd ..

To move to the directory root: cd \ or in most cases cd c:\

To move into a directory (to the windows dir from the root directory for example): cd windows



Once you are in the desired directory you are ready to search. Here is a basic example of the command:

dir /s /b myfile.txt



This example would search the current directory and all sub directories for the myfile.txt file. The /s option searches subdirectories. The /b option displays the path to the file so you can see the path to the file and use a tool like File Manager to navigate to it.



Here are a couple more examples.



Here is an example of a search for all files that end in .help.txt. The * means all files with this file extension. This search takes place in the c:\windows directory.



C:\WINDOWS>dir /s /b *.help.txt

C:\WINDOWS\system32\WindowsPowerShell\v1.0\about_aliases.help.txt

C:\WINDOWS\system32\WindowsPowerShell\v1.0\about_arithmetic_operators.help.txt

C:\WINDOWS\system32\WindowsPowerShell\v1.0\about_arrays.help.txt





Here is an example of a search for all files that contain winhelp in the file name with any extension.



C:\WINDOWS>dir /s /b winhelp.*

C:\WINDOWS\winhelp.exe

C:\WINDOWS\system32\winhelp.hlp

C:\WINDOWS\system32\dllcache\winhelp.exe



C:\WINDOWS>





As long as you do not search the entire disk, performance is really quite snappy. Even searching the entire disk is still pretty good.

Tuesday, 16 August 2011

Remote Desktop Connection Location

Microsoft Logo

Problem: I need to use Microsoft Remote Desktop Client on Windows XP, but can't find it. Trying to install the program from Microsoft's web site results in an installer error stating it is already installed.



Solution: The Remote desktop connection is located in the following place:

c:\WINDOWS\SYSTEM32\mstsc.exe



To run the program, just click Start --> Run and enter mstsc. To create a shortcut, navigate to c:\windows\system32 then right drag the file to the desktop.

Thursday, 23 June 2011

Cyberduck FTP/SFTP/DAV Client also Available on Windows

I just wanted to mention today that my favorite FTP/SFTP/DAV client for the Mac is now also available for Windows. The same great interface and functionality as the Mac client. You can download the Windows client for free at:



Cyberduck Site



My initial testing with the Windows version has been very positive. So I suggest you check it out.

Command Line Aliases for Windows

Microsoft Logo

Over the years, I have used Mac OS X and Unix quite a bit for work. However, my current job requires me to work with Windows XP and Windows 7. The Unix Bash shell has an alias feature which allows you to create short commands for commonly used commands. For example, typically I will setup an ll alias for the ls -l command on Unix. However, Windows doesn't have an equivalent. Or does it?



I have found that you can set up Windows batch files to work just like aliases in Unix. For example, let's say I want to set up aliases for ls and ll (which my brain is always trying use anyway). With a text editor create files that look like this:



ls.bat

@dir /w %1 %2 %3 %4 %5 %6



ll.bat

@dir %1 %2 %3 %4 %5 %6



The "@" symbol prevents the command from being echoed to the console making the batch file act just like a normal command. The "%" numbers are command line parameters passed to your command. This allows you to type ls C:\ and still have the command work.



To use the files, they must be placed somewhere in the path. Either a directory you have added to the path or the C:\windows\system32 directory. Once you have done this you should be able use the commands to your hearts content. Here are some examples I typically setup for all my Windows machines.



c.bat - CD to the root of the C Drive

@C:

@cd c:\



home.bat - CD to the current users home directory

@cd %homepath%



Simple command files like these can save you a lot of time when you work with the command prompt a lot.

Monday, 23 May 2011

Swap Control and Command Keys on a MacBook Pro Running Bootcamp and Windows 7

Apple MacBook and MacBook Pro laptops are some of the best laptops out there on the market. Not only great for running OS X, but with Bootcamp they make great Windows laptops too.



However, one annoyance with Windows on a Macbook is the tiny little Control key on the left side of the keyboard. When you cut and paste a lot of text, like I do, pressing Control-c or Control-v can be a little difficult. Not a problem when running OS X, since you use your Command key (right next the the Space Bar on a Mac). However, once in Windows you stuck with that little Control key. Or are you?



Recently I found out there is a way to make your left Command key function like the Control key.This is not a key swap, it is really just a key reassignment. So the right command key still works like a the Windows key. But after making this tweak, your left Command key works just like the Control key making your cut and paste keystrokes a lot easier.



The key reassignment is done in the registry. However, since mere morals don't really want to work with the Registry and its nasty hex codes, there is a utilty to do this. Download Sharpkeys 3.0 from here and read the explanation of what it it does from RandyRants.



To reassign the key, start SharpKeys and click add your dialog looks like this:



Chose the left Command key as the "from" key (note in Windows it shows up as the left Windows key). And choose Control as the "to" key. Click OK.



Any reassigned keys are listed in SharpKeys in case you ever want to remove the mapping. Click on the "Write to Registry" button when you ready to make the changes to the Registry.





That's it, the changes have been written to the Registry. Logoff and log back in or reboot. Now you can cut and paste in Windows with your thumb instead of your with your little finger. Absolutely wonderful stuff! Enjoy.

Thursday, 19 May 2011

du Utility for Windows

Microsoft Logo

There are a lot of really cool utilities built into Unix. Found another today that has been ported to Windows. Check out the Windows version of du. Download it for free from Microsoft Technet:

Disk Usage v1.31



Very fast and useful to have for the command line.

Tuesday, 1 March 2011

iTunes too many computers authorized? Fix??- Dave Taylor

You know how to used to have a really groovy eMac that had all your music on it? And about 2 years ago you had the system recycled. And remember how you forgot to deauthorize the machine. And now you have a shiny new Mac Book but you have run out of authorized machines. A sad sad story. But Dave Taylor comes through again with the solution. Check it out:

iTunes too many computers authorized? Fix?? - Dave Taylor

Friday, 25 February 2011

How to Add VCards to Thunderbird

At work, we have this really nice staff directory. However, it only exports a person's entry in VCard format. But Thunderbird doesn't have a way to import a VCard. Or does it? To add a VCard to a Thunderbird Address Book do the following.

  1. Save the VCard to a file.

  2. Attach the VCard file to an email message and send it to yourself.

  3. When you receive the message, the VCard will be attached along with a small icon that represents a person.

  4. Click on the icon, and Thunderbird will provide a popup that adds the VCard to your address book.

That's it. Saves a bunch of typing.



Thanks to MacWorld hints for the idea.

Saturday, 13 November 2010

Must Have Software for a New Windows 7 System

Well, I have been setting another new Windows 7 Home 64 bit machine. So this is my updated list of must have software. Most are free and open source.



Browsers

I run multiple browsers almost all the time. Firefox as a development and default browser. Chrome or Safari for web surfing, and SeaMonkey for those multiple profile sort of situations.



  • Firefox - Best overall browser and best for development.




  • Chrome - Fast browser from Google. Minimalist interface.




  • Safari - Default browser for a Mac. Small and fast like Chrome.




  • SeaMonkey - Based on the original Netscape browser. Supports multiple profiles.  Can run 2 or 3 browsers, each with its own set of bookmarks.



Internet

Internet utililies and cloud applications.



  • Drop Box - A disk drive stored in the cloud. Provides access to a disk from Windows, Mac, iPhone, iPad, Linux, you name it. A must if you want to move files between different platforms and devices.

  • Filezilla - A secure FTP client for Windows. A must for transferring files to and from a Unix system. FTP and SFTP is supported. Lots of features.

  • Pidgin - Open source chat client for Windows. Used to be know as GAIM.

  • Putty - Windows SSH and Telnet client. A must if you do any Linux or Unix work.

  • Skype - Free Internet phone service and chat. You can group chat with up to 5 people

  • Thunderbird - Mozilla's awesome e-mail client.






Development

  • ActivePerl- Perl for Windows.

  • Cygwin - Want a Bash shell on Windows? Want some of your favorite Unix utilities?  Then Cygwin is for you.

  • Jedit - A really flexible programming editor written in Java.




  • Java - Install the 32 bit and 64 bit versions for 64 bit Windows. Just the 32 bit for 32 bit.

  • Komodo Edit - A cross platform open source programming editor. Lots of features for free. A commercial paid full featured IDE is also available.

  • Notepad++ - It is always a good idea to have a good native programming text editor around. For those times when you need a quick tweak or just want to view something. For Windows, Notepad++ is the best option out there.


  • NetBeans - A great Open Source Java IDE.




  • SQLite - File based SQL database.


  • Silk Svn Subversion Client - Windows 7 64 bit command line version.




Office

  • Open Office - Open source office suite.




  • Paint.net - Open source graphics program.  A basic photo app without all the features or price of Photoshop.


  • SVG Anti-Virus - Great free or paid anti-virus you can buy and install online.


Tuesday, 14 September 2010

A Real Linux/Unix Terminal for Windows with Cygwin

Linux LogoIf you have not heard of it before, Cygwin is a set of Linux/Unix utilities made to run on Windows. Cygwin includes a plethora of tools including databases, programming languages, and command line utilities. But what I use it for mostly is to have a bash shell for Windows. That allows me to use most of the aliases, symbolic links, and other tricks I use to navigate Linux or Mac OS/X on Windows. It also makes file manipulation a lot easier.



The default Cygwin installation uses the same command window as the Windows command prompt. Which is a little clunky, to say the least. Specifically, cutting and pasting text is a pain in the rear. You have to jump back and forth to the menu to cut and paste text. It is slow, clunky, and annoying.



The solution. Install rxvt with Cygwin. This is a terminal emulator that gives you all those cool cut and paste shell features on Windows. Just install rxvt from the shell options as part of your Cygwin install. Then, create a batch file like this in your Cygwin directory.



@echo off

C:

chdir \cygwin\bin

start rxvt -sr -sl 10000 -fg white -bg black -fn Consolas-20 -fb Consolas-20 -fm Consolas-20 -tn cygwin -e /bin/bash --login -i






I called my file, term.bat. Run the bat file and you get a bash shell and window that behaves just like it would on Linux or a Mac. Yays!



Credit to c2.com for a pointer that got me started on this.

Wednesday, 21 July 2010

Ever Want to Know How Fast a Thumb/Flash Drive is?

Ever Want to Know How Fast a Thumb/Flash Drive is? I have. It is really hard to get any good decent information on speed. The reviews I find by Googling around cover all the frickin' features except the drives speed! That is the only feature I really care about other than size. Plus if I want to encrypt something, I am going to use an open source tool like truecypt, not some proprietary piece of feces.



Anyway, I found a good free Windows tool to do a little benchmarking, Crystal Disk Mark. It gets the job done and is really easy to use. Based on my testing, the only thing that seems to matter is the sequential read and write tests. That, in effect, is a file copy test, which is what I would use the drive for most of the time. All the drives I tested were horrible in the random access tests. You are much better off getting an external USB hard drive for that purpose.

Thursday, 13 May 2010

So Much for the NetBook Experiment



Well I have been playing around with a 10" HP Netbook for the last 6 months or so. I have taken it on business trips, vacations, and just around town. My goal was  to use it as much as possible and see how useful it is.



My conclusion.  Netbooks are just too damn small. lol. From a purely technical point of view, there is nothing to complain about. The Intel Atom CPU has plenty of power and Windows 7 is a pretty sweet OS. The HP has a great screen and really good battery life. Surfing the Web on Chrome or Firefox is good. And you can hardly feel it when you carry it around.



But have you ever tried to put the thing in your lap and work on it for more than 15 minutes?  Or actually do some writing or coding on the screen?  It just doesn't fit or work well. I feel like I have stolen a device from a gnome. lol.



Thus my enthusiasm for the iPad in a previous post. Instead of feeling small, it feels just about right. So its back to my 13" Macbook for actually getting something done and being portable.