Twitter Window Command Line Client

Written by Saman Sadeghi on May 8, 2008 and has been viewed 410 times. 9 Comments »

By now, just about everyone knows about the Twitter Command Line Client for Linux. Ever since I started using it, I fell in love and I’ve been looking for something similar for Windows. Well, I’ve finally found it: The Twitter CLI is a simple tool that lets you post updates to Twitter from the Windows Command Line or, my favorite, the Run dialog.

Download

The small file is located at Phalacee.com.

Installation

  1. Extract the contents of the Twitter CLI.zip file into your Windows folder, which is located at:
    C:\Windows
  2. Open the Twitter.bat file in Notepad (right-click, then choose Edit) and enter your Twitter user name and password in the appropriate fields:
    set username=YourTwitterUserName
    set password=YourTwitterPassword
  3. Save the file and close Notepad.

Update Twitter Via Command Line

Now you are able to Tweet via your Windows Command Line:

  1. Hit the Windows Key+R
  2. Type in the following:
    twitter ""
    Enter your status between the quotes.
  3. Hit OK or the Enter on your keyboard.

That’s all there is to it! If you want your update to read: I’m eating over my keyboard and making a mess! You would enter:
twitter "I'm eating over my keyboard and making a mess!"

Notes

  • The message must be less than 140 characters, which is Twitter’s limit.
  • It’s not necessary to use quotation marks in your update but will be needed if you’re inputting a URL in your message:
    twitter "I just added a great picture to Flickr http://tinyurl.com/6r95ur"

Integration With Facebook

You can have this Twitter Window Command Line Client update your Facebook status by using the TwitterSync Facebook application (technically, the CLI client is still updating Twitter. The TwitterSync app just polls your Twitter feed and updates your status). I use it on my Facebook profile.

I prefer this application over Twitter’s Facebook app because it doesn’t add the prefix of: “is twittering:”, though you can add any prefix, if you wish. Also, because you can update Twitter via SMS, you can update your Facebook status via text message! Or, if you don’t want to, TwitterSync wont update if the tweet has a specific prefix (that you set). So, if you sent something like “from cellphone: I hate traffic!!”, then it wouldn’t update your Facebook status!

Megaman Loves These Related Posts:


Megaman
  • View Samanathon.com From A Command Line Interface
  • Customize The Command Prompt
  • Internet Explorer 7’s Kiosk Mode
  • Internet Explorer Command-line Switches
  • Windows Hacks: Improve The Context Menu, Part 4


  • Create a Startup Menu With Different Boot Options

    Written by Saman Sadeghi on April 13, 2008 and has been viewed 457 times. 3 Comments »

    Last week, I showed you how to edit XP’s boot.ini file. This week I’ll show you how to create a bootloader menu even if you have only one operating system installed! You can set up a boot menu that will let you choose to load your OS with different options:

    • Your normal operating system
    • A mode that lets you trace any startup problems
    • Safe Mode

    All you have to do is create entries with different switches!

    Setting up Boot Options

    If you wanted to start XP in a mode that will trace potential startup problems, you could create this entry: multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Trace Problems XP Home Edition"
    /fastdetect /bootlog /sos

    This setup creates a startup log and displays information about the drivers and other operating system information as it loads them.

    To boot in Safe Mode with networking, you’d setup this entry:

    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Safe Start XP Home Edition" /
    fastdetect /safeboot:network

    Example

    Lets say that you want the bootloader menu to display for 30 seconds, normal XP startup to be the default and the above examples listed above there too:

    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home
    Edition" /fastdetect
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Trace Problems XP Home Edition"
    /fastdetect /bootlog /sos
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Safe Start XP Home Edition" /
    fastdetect /safeboot:network

    GUI Options

    If you’re not too comfortable editing the boot.ini file, you could always use the System Configuration Utility. It won’t provide you with as many options as setting your own switches, but it can be much safer if your leery.

    1. Hit the Windows Key+R
    2. type the following, then enter:
      msconfig
    3. Click the Boot.ini tab
    4. Select options under the Boot Options section.

    The System Configuration Utility

    Ryu Says 'Read These Related Posts!'


    Ryu
  • Windows Tip: Monitor CPU Usage
  • Windows Hacks: Improve The Context Menu, Part 1
  • Information and Options of XP’s boot.ini File
  • Windows Hacks: Improve The Context Menu, Part 3
  • Windows XP’s Hidden Programs


  • Information and Options of XP’s boot.ini File

    Written by Saman Sadeghi on March 30, 2008 and has been viewed 1,012 times. 4 Comments »

    Window’s XP’s boot.ini file is a hidden system file in your system’s root folder (it’s in the C:/ drive). By default, XP hides all system files to prevent unknowing users from screwing something up. Also, the file is sometimes set to Read Only.

    Display Protected Operating System Files

    We will need to display system files to be able to edit the file. To do so:

    1. Launch Windows Explorer (Windows Key+E)
    2. Click Tools -> Folder Options
    3. Click the View tab
    4. Untick the checkbox labeled: “Hide protected operating system files (Recommended)”
      Hide Protected Operating System Files
    5. Click “Yes” in the Warning dialog
      Hide Protected Operating System Files Warning
    6. Click “OK”

    You should now see the boot.ini file in your C:/ drive.

    The boot.ini file

    If the file is marked as “Read Only”, right-click boot.ini and click properties, untick the “Read Only” checkbox.

    The Default boot.ini File

    If you have a single Windows OS installed, your original file should look similar to this:
    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect

    If you have two Window’s Operating Systems, it could look like this:
    [boot loader]
    timeout=30
    default=multi(0)disk(0)rdisk(0)partition(1)\WINNT
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows 2000 Professional" / fastdetect
    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /NoExecute=OptIn

    Breaking Down The Parameters

    Before we start playing around with this file, let’s make a copy of it and store it somewhere for safe keeping - there is a reason why Microsoft hid it! :wink: Save your copy in the C:/ drive and name it something like: old_boot.ini.

    There are two sections to this file: [boot loader] and [operating systems]. Let’s break each section down:

    [boot loader]

    This section controls how the boot loader will work. It specifies the default Operating System and how much time a user has to choose from one of the choices in the boot menu - if the boot menu has been enabled.

    timeout

    The timeout value specifies, in seconds, how long to display the bootloader menu and wait for the user to make a choice before loading the default Operating System. If you want to show the menu for 30 seconds, then set the value to 30. If you want the default operating system to boot right away, then set the value to 0. If you want the menu to be displayed forever and stay on screen until the user makes a choice, then set the value to -1.

    default

    The default value decides which of the operating systems listed is the default. This must be listed, even if there is only one OS installed on this machine! In my second example above, the current default OS is to multi(0)disk(0)rdisk(0)partition(1)\WINNT. If I wanted XP Pro to be the default, with a selection timeout of 15 seconds, I would set my options as so:
    [boot loader]
    timeout=10
    default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS

    [operating system]

    This section lists all of the Windows Operating Systems that are installed on this computer, and lists some options for each one. XP uses the Advanced RISC Computing (ARC) path to specify the location of the boot partition. In our example, the ARC path is:
    multi(0)disk(0)rdisk(0)partition(1)\WINNT

    The first parameter, which identifies the disk controller, should be 0. The second parameter, the disk parameter, should also be 0. The rdisk parameter identifies the disk number on the controller that has the boot partition. The numbers start at 0. So, if you have three hard disks installed and the second hard disk has the boot partition, the setting is rdisk(1). The partition parameter identifies the partition number of the boot partition. Partitions start with the number 1. The last section details the path to the folder where the operating system is installed.

    To the right of the ARC path in the example is =” Windows 2000 Professional” /fastdetect. The text in quotes is what will show upon the boot menu. You could set this to whatever you want: “XP: Pirated Edition” The /fastdetect switch disables the detection of serial and parallel devices, which allows for faster booting. The detection of these devices isn’t normally required in XP, because the functions are performed by plug-and-play drivers, so as a general rule it’s a good idea to use the /fastdetect switch. The following table shows a few more switches you can use:

    Switch Discription
    /BASEVIDEO Starts XP using the standard VGA driver. It’s most useful if you can’t boot normally because of a video driver problem.
    /BOOTLOG Logs information about the boot process to the ntbtlogl.txt file in the C:\Windows folder.
    /CRASHDEBUG Loads the debugger at boot, but the debugger remains inactive unless a crash occurs.
    /DEBUG Loads the debugger at boot and runs it.
    /FASTDETECT Disables the detection of serial and parallel devices.
    MAXMEM:n Specifies the maximum amount of RAM that XP can use.
    /NOGUIBOOT Does not allow the XP splash screen to load during boot.
    /NODEBUG Stops the debugger from loading.
    /SAFEBOOT:switch Forces XP to boot into the safe mode specified by the switch parameter, which can be minimal, network, or minimal(alternate shell). In minimal safe mode, only the minimum set of drivers necessary to start XP are loaded. In network safe mode, networking drivers are loaded in addition to the minimum set of drivers. In minimal(alternate shell) the minimum set of drivers are loaded and XP boots into the command prompt.
    /SOS Displays the name of each driver as it loads and gives descriptions of what is occurring during the boot process. It also offers other information, including the XP build number, the service pack number, the number of processors on the system, and the amount of installed memory.

    When you’re all done playing around, save the boot.ini file. The next time you start your machine, you’re newly created file will be used – but only if you’ve kept the boot.ini file name! :!:

    Example

    If we want the menu to appear for 2 minutes, the default operating system to be XP, and the Windows 2000 splash screen to be turned off when we choose to load 2000, the boot.ini file should look like this:
    [boot loader]
    timeout=120
    default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
    [operating systems]
    multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows 2000 Professional" /fastdetect /noguiboot
    multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect

    MMMMM... Related Posts


    Homer
  • Create a Startup Menu With Different Boot Options
  • Windows Hacks: Improve The Context Menu, Part 2
  • Windows Hacks: Improve The Context Menu, Part 3
  • WordPress Plugin: 404 Notifier
  • Windows Hacks: Improve The Context Menu, Part 1


  • Shutdown Multiple Windows Machines From The Command Prompt

    Written by Saman Sadeghi on March 13, 2008 and has been viewed 914 times. 10 Comments »

    I’ve written about my love of batch files many times and one of my favorite tricks is shutting down a computer via the command line. In this tutorial, I will show you how to shut down multiple computers, which already connected to your network, via a batch file. This particular batch file will feature a loop that calls our shut down routine as needed!

    More Information

    Batch files are executed line by line, from top to bottom. By using labels, we will make the program jump around a bit. This will allow us to set a variable, call central command, then reset the variable and call the central command again. By doing this, we are only creating one variable – regardless of how many computers we have - we will just reuse that single variable. Less is more people! This method creates smaller, cleaner code: We don’t need separate variables for each computer; we just reset that variable as we need! Also, it’s important to note that each computer will use the same shutdown routine.

    Before we start, you will need to make sure that you know the name of each network computer and can access it. To find out the computer’s name, walk to each machine and hit the Windows Key+Pause/Break key and click on the Computer Name tab. Look for the value under “Full computer name:”. Once you know the name of each computer connected to the network (that you’d like to remotely shut down), the easiest way to see if you can access them is with the command prompt: Go to your machine (the one that will be running the command file, not the networked machines), hit the Windows Key+R, and type:
    \\{computer name}
    For example, if the networked computer’s name is “274D”, you would enter:
    \\274D
    If the computer’s shared directory is displayed, then you’re connected! If you get an error, then you need to check connectivity settings and those are beyond the scope of this article.

    Creating The File

    Save Text File As .batOpen Notepad and save the file, on your Desktop, as “Network Shutdown.bat” (or “I love ham”, it’s your choice :razz: ). Make sure you set the “Save as type” drop down to “All files”.

    Listing Each Computer

    Right-click your newly created batch file and click Edit (double-clicking it will launch the file). We need to list all of our computers in blocks. Each block be composed of three lines of code: We will set a variable with the network computer’s name, call the loop and then create a new label with that computer’s name:
    set varcomputer=274D
    goto loop
    :274D

    Let me explain what each line means:

    1. set varcomputer=274D
      By using the “set” command, we are creating a variable called “varcomputer”, we then set the variable. In this case, with the value “274D”
    2. goto loop
      We are telling the program to go to the label named “loop”, which we will create in a few steps.
    3. :274D
      This label has the value of the computer in this block. The loop below will tell the program to go to this label, then the program will continue on the next line (line by line, remember?!).

    Create a block for each computer that you’d like to shutdown:
    set varcomputer=274D
    goto loop
    :274D

    set varcomputer=322A
    goto loop
    :322A

    set varcomputer=bobs_pc
    goto loop
    :bobs_pc

    Notice that we are reusing the varcomputer variable. After you’ve listed each computer, write the “exit” command. This will tell the computer that we are all done and it may close the progam:
    exit

    Creating The Loop

    The loop will consist of four parts: a label, some information for the user, the actual shutdown command and the return for the loop:
    :loop
    echo Shutting down %varcomputer%.
    shutdown -s -m \\%varcomputer% -t 600 -c "The computer is shutting down. Please save your work."
    goto %varcomputer%

      Again, let’s break down each section:

    1. :loop
      This is the entrance for the loop. The second line of each computer block is sent to this label.
    2. echo Shutting down %varcomputer%.
      This is the information that is returned to the user who runs the program; it reads the current value of the “varcomputer”. This information will not be displayed on the networked machine.
    3. shutdown -s -m \\%varcomputer% -t 600 -c "The computer is shutting down. Please save all of your work."
      This is the shutdown command. It contains a few a few parts. For detailed information on each switch, please read Windows Tip: Shutdown Your Computer With The Command Prompt
    4. goto %varcomputer%
      This is the return for the loop. The program reads the current value of the “varcomputer” variable, returns to the final line of the current block and continues to the next block. By using the goto command, we are telling the program to return to a label – one that we’ve set with the “varcomputer” variable.

    The Finished Product

    Now that we are armed with this knowledge, we can put it all together – but before we do, let’s add a few finishing touches. At the beginning of your file, add this:
    @Echo off
    This will hide all commands from the user’s view and will only display comments (that are preceded by “echo”). Also, you’ll notice there are a few lines that are started with “rem”. These are internal comments that are not processed by the program. I’ve peppered the file with a couple for you to marinate on.

    Your batch file should look like this:
    @Echo off
    cd\
    Echo Saman=Program
    REM ****************************
    REM * Program Variables *
    REM ****************************

    set varcomputer=274D
    goto loop
    :274D

    set varcomputer=322A
    goto loop
    :322A

    set varcomputer=bobs_pc
    goto loop
    :bobs_pc

    Exit

    REM ****************************
    REM * Program *
    REM ****************************

    :loop
    echo Shutting down %varcomputer%.
    shutdown -s -m \\%varcomputer% -t 600 -c “The computer is shutting down. Please save your work.”
    goto %varcomputer%

    Cancel The Shut Down

    You can cancel a shut down that is in progess with the following line. This line cannot be run through the network! You have to walk to each machine and run the command either from the command prompt or the Run dialog, or Windows Key+R:
    Shutdown -a

    Kuribo Mario Hops For These Related Posts:


    Kuribo Mario
  • Windows Tip: Shutdown Your Computer With The Command Prompt
  • Windows Tip: Log Off Your Computer With A Shortcut
  • Windows Tip: Shutdown Your Computer With A Batch File
  • Customize The Command Prompt
  • Windows Hacks: Improve The Context Menu, Part 4


  • iPhone: Apple on the Go

    Written by randrus on February 5, 2008 and has been viewed 722 times. 10 Comments »

    There I was sitting in Honolulu thinking to myself that it was about time to pick up a decent digital camera.  I’ve always enjoyed photography and own a nice 35mm SLR, but I hadn’t joined the digital world yet because I didn’t want to “downgrade” my camera (I can’t afford one of those fancy Digital SLR camera’s yet)  But I’m in Hawaii….You can’t run around without a digital camera there, so it was time to bite the bullet and pick up a simple point and shoot digital camera.  Now I’ve always despised phone cameras, the quality is terrible and you can barely make out faces.  I try and avoid using mine as much as possible.  So during the lunch break, I was out with Saman and guys at the mall, and like everytime Saman and I go anywhere near an Apple store, we stopped in to see the new toys.  This was the first time I’d ever actually held the iPhone in my hands and played with it.  And sure enough within a day or two I picked one up and justified the purchase by claiming it was my camera.

    The Camera was one of the first things that impressed me with this new wonder toy.  With a two megapixel digital camera, the quality is actually good enough to use for some real pictures.  (Now don’t get me wrong, I’d still take a 7 or 8 megapixel camera any day of the week, but 2 is enough to actually get some decent 5×7 prints from)  The greatest feature of this little marvel camera, happens to be that it IS a phone camera, I find that I always have a good camera with me now and can take pictures of things that I would otherwise have missed out on.

    On the bad side, the camera does have a few limitations and issues.  1) No Movies, still frames only…I personally don’t take many movies anyway so it wasn’t a big set back. 2) Self portraits are pretty much not happening.  The soft button that you use to take the picture is in a great location when you’re looking at your target, but when trying to take your own picture, it’s nearly impossible to actually press that button and hold the camera pointed at you at the same time. 3) No zoom, at all, period.  You have to frame the picture by where you stand, 9 times out of 10 you can deal with it, but every once in a while, it would be really nice to be able to zoom in or out a touch.

    Other features that I love about the iPhone:

    1) Google maps.  It’s so nice to have a mobile reference when walking around the streets of cities that I don’t really know.  Downside is that there is no GPS.  The locate me feature is nice, but leaves you wanting a bit more.

    2) Contact management.  Something I think everyone forgets about the iPhone, the contact management system syncs great with Address Book on your mac, and is incredibly complete.  I can call, text, email all from my iPhone, I can also store address information, Instant messaging screen names, notes, and even a photo all in the same address book that I sync between my iPhone and computer.  The downside here is that you are missing a couple of key features, like being able to organize the groups directly on the iPhone, currently I have to organize groups on my computer.  And also being able to assign ringtones to groups…key feature, I can’t believe it’s not around yet.

    3) iPod on your phone, got to love it.  Now I’m never without my tunes.  Too bad they don’t have the 160gb model yet….

    4) Slide to Unlock..  I love bar phones, I’ve never particularly cared for flip phones, but the one problem I’ve always had, is accidental dialing even when I lock my phone.  The iPhone is the first phone that I’ve never had a problem with.  I’ve only had an accidental dial once, and that’s because I didn’t lock my phone before putting it back in my pocket.

    Overall I love my iPhone, but there are a few things that really do need to be fixed/added/improved before the device will really live up to it’s potential, but in the mean time I haven’t found anything else that can even compare with the feature set and simple interface that the iPhone currently offers.  Personally I’m going to be really excited to see the 2nd generation of the iPhone..maybe iPhone Air?

    Sub Zero Reads These Related Posts:


    Sub Zero
  • iPhone Teaser Ad
  • Apple Announces iPhone At MacWorld 2007
  • iPhone Autopsy
  • Would You Install A iPhone Plugin For Your Blog?
  • 45 Minutes With The iPhone