Friday, February 05, 2010
Monday, January 11, 2010
Saturday, January 09, 2010
Sometimes you like Windows to do something everytime during its startup or shutdown. An example is to delete the contents inside a folder. These can be files that you do not need for the next startup.
First you need to create the script that would tell Windows which folder to delete. Then you would go to Group Policy and tell Windows to run this script at shutdown as what will be shown here.
Here is the script written as a batch file.
c:
cd cd c:\windows\prefetch
del *.* /q
cd C:\”Documents and Settings”\user\Desktop\temp
del *.* /q/f/s
cd rd C:\”Documents and Settings”\user\Desktop\temp /q/f/
cd cd c:\windows\prefetch
del *.* /q
cd C:\”Documents and Settings”\user\Desktop\temp
del *.* /q/f/s
cd rd C:\”Documents and Settings”\user\Desktop\temp /q/f/
Save this file as a plain .txt file. As you can see, this script will delete the contents inside the prefetch folder and a folder on the desktop called temp.
Now go to GP and tell it to run this script at shutdown. Type gpedit.msc in the Run command. Navigate to the appropriate location as seen in the picture.
Mutihomed PCs
A multihomed PC is one that has more than one network card in it. Well, the cards can be connected externally as well. Because the operating system, this case Windows XP, has more ways to reach out to the network with this multitudes of NICs, the choices for some fancy networking setup is possible. In this tutorial, I will keep things simple.
Let’s say you have two computers PC1 and PC2 with each computer has a network card in it. Both PCs can connect to the Internet at the same time courtesy of a router with an integrated switch that they are connected to. Through this router/switch, these two computers can also share files. Ok, so let’s say I want to keep the connection that is for sharing files and the connection that is sharing the Internet separate. This can be done by adding a second NIC to each PC. The following is the layout of the physical network.
INTERNET NIC1 ---- (switch/router) ---- NIC1 PC2 PC1 NIC2 --- (crossover cable) --- NIC2
As you can see, the NIC2 on both PCs are connected with a CAT5 crossover network cable. This is the connection that is used to transfer non-Internet data.
Now the hard part: assign the appropriate IP addresses to the various NICs.
Now the hard part: assign the appropriate IP addresses to the various NICs.
INTERNET NIC1 ---- (switch/router) ---- NIC1 PC2 PC1 NIC2 --- (crossover cable) --- NIC2
PC1NIC1: gets its IP from DHCP server
PC2NIC1: gets its IP from DHCP server. The IP range is 192.168.1.2 – 50
PC1NIC2: 192.168.2.1 Subnetmask: 255.255.255.254
PC2NIC2: 192.168.2.2 Subnetmask: 255.255.255.254
PC2NIC1: gets its IP from DHCP server. The IP range is 192.168.1.2 – 50
PC1NIC2: 192.168.2.1 Subnetmask: 255.255.255.254
PC2NIC2: 192.168.2.2 Subnetmask: 255.255.255.254
Now the secret. We need to create a static route in the routing table that would connect the two NIC2 together. This way, this “crossover” path has higher priority when time to communicate with each other. Noticed that I do not include the gateway and DNS IP for NIC2. This info is not necessary in this case for inter-PC data transfer. It is needed however for the Internet access.
The static route command is as followed.
On PC1:
route add -p 192.168.2.2 mask 255.255.255.255 192.168.2.1
route add -p 192.168.2.2 mask 255.255.255.255 192.168.2.1
On PC2:
route add -p 192.168.2.1 mask 255.255.255.255 192.168.2.2
route add -p 192.168.2.1 mask 255.255.255.255 192.168.2.2
The -p switch is just to tell Windows to remember the setting after restart.
So is this just an academic exercise or does it have practical use? Well, imagine instead of having just 2 PCs in this network, we have 10. All are connected to the switch/router and use the Internet extensively. However, of these 10 PCs, only PC1 and PC2 share lots of data. If this pair does not have its own “private” network, then their data sharing will flood the switch and slow down the Internet for everyone else.
Automatic backups
When you use the computer to create important data, you should create another copy of that data, a process known as backup, and store that copy (backup) on the same machine, a different physical harddrive on the same machine, or on a harddrive on another machine. The best kind of a backup plan is to have the copy stored offsite. Offsite means the backup is on a computer that is physically nowhere near the computer that has the primary data.
Most of the time, the backup process is so laborious that we human beings “forget” to do it. This is where automatic backup programs can help us in this repetitive, tedious, and at times quite complicated task. Basically an automatic backup program at a predetermined interval of time makes a copy of a certain piece of data (usually a folder with files) to another location that is either local or over the network.
I have been using one such program for a few years now and am very happy with it. It’s called SecondCopy2000 from http://www.centered.com. The latest version is version 7. The only major difference that I am able to tell between version 2000 and 7 is the ability of version 7 to backup to and download files from FTP servers both local and over the Internet. Both versions offer compression and incremental backup. Incremental backup is the act of copying only files that have been modified since the previous backup. This greatly reduces the duplication of the copying and save time and network bandwidth.
I will take a test drive version 7 and will give you my opinion of it in Part 2 of this post
Improve the Remote Desktop experience with gigabit and firewire connection?
I love remote access of computers. The concept (and reality) of people sharing one physical machine simultaneously fascinates me. Imagine having let’s say 10 people at the office. Instead of given each of them 10 fast new PCs, knowing that they barely tap into the full potential of the hardware, all of them would log into one powerful machine from their old “crappy” machine and use that “server” as if they were physically sitting in front of it. All the processing and calculations are done on that server. Only the screenshots are sent to the user and in return, only the keystrokes and mouse movement are sent to the server. So as long as the server’s hardware is powerful enough to run multiple sessions and the network physical infrastructure can handle all this data zipping back and forth, this centralized mode of computing is feasible. Feasible, but not perfect.
Although you can get a fairly powerful PC to act as the server that can handle multiple users at the same time with aplomb, currently the network speed has fallen grossly short compared to the data transfering within the various subsystems of a PC. For example, with a SATA2 harddrive, you can transfer up to 300MB of data per second. Actually in practice, it’s more like 120MB/sec, but still that is very fast compared to the data transfer rate over the network which is now clocked at 1000Mb/sec theoretical (that’s megabit not mega byte). Therefore, the remote access experience is still plagued with choppy frame rates as viewed on the machines that are accessing the server, giving away the illusion that the user is using the machine locally.
However, the problem might not be the fault of the network, but of the remote access program itself and perhaps the RDP protocol it uses to do this. I have experimented with gigabit Ethernet which is supposedly 10 times faster than the still-common 100mbps network. While data transfer like through shared drives is twice as fast (not 10x), the remote access experience is still a disappointment. The user still is aware that he is actually using remote access because for example, when he moves a window, there is still a lag. Therefore, increasing the raw speed of the network does not make the experience of remote access any smoother.
I should mention that I use XP Remote Desktop in this test. There are several other remote access solutions out there including the venerable VNC. VNC uses the RFB protocol unlike Remote Desktop which uses RDP. These different protocols render the screen differently. Here are links to discussions on VNC vs. Remote Desktop.
http://forum.ultravnc.net/viewtopic.php?p=22311
http://forum.ultravnc.net/viewtopic.php?t=269&sid=77eb17583827576e541e261db0c25a7f
http://forum.ultravnc.net/viewtopic.php?t=269&sid=77eb17583827576e541e261db0c25a7f
There are several versions of VNC to choose from. I used TightVNC because of its simple interface. Afterall, this is a speed test, not features. To my disappointment, TightVNC did not improve on performance when I tried to run the Belzier screensaver on the server machine. The interesting thing compared to Remote Desktop is while the animation is clearly smoother with VNC, it leaves behind trailing artifacts. I assume this is the result of the the different way RPD and RFB protocols render the screen on the client machine.
My next phase of the experiment is using firewire technology. We all know that firewire is commonly used to transfer captured video from digital camcorders to the computer and vice versa, but you can use firewire as a networking medium between computers as well. Firewire has not caught on in networking because of the maximum length the firewire cable can be is 14 feet whereas Ethernet CAT5 cables can be up to 328 feet! Since networking is all about having computers far apart to talk to each other, firewire has limited potential in that regard. However, what if the computers are less than 14 ft apart? Can firewire be used in remote access to make the frame rate refresh much faster, enough to make the experience as real as local use of the computer?
I connected two reasonably fast computers with a firewire cable through their respective firewire connectors. I used firewire A which has the max speed of 400mbps. A raw data transfer test showed great promise when the firewire connection enabled me to copy a large folder of mp3 files in 3 minutes compared to 5.5 minutes with 100mbps Ethernet. However, when I used the firewire path for Remote Desktop, there was no discernible increase in the refresh rate of the screen. After this test, it became clearer that the remote access experience, at least with Remote Desktop, cannot be improved with a mere increase in the bandwidth. This is not a surprise since Remote Desktop is never meant for using any applications that have their GUI change constantly, applications like Photoshop and AutoCAD.
Dictionary for Decoding Women’s Personal Ads
I found this tidbit on the Net. Too funny not to pass it on.
40-ish…………………………….49.
Adventurous……………………..Slept with everyone.
Athletic…………………………..No breasts.
Average looking…………………Moooo.
Beautiful…………………………Pathological liar.
Emotionally Secure………………On medication.
Feminist………………………….Fat.
Free Spirit……………………………Junkie.
Friendship first…………………..Former Slut.
New-Age…………………….Body hair in the wrong places.
Old-fashioned……………………No B.J.’s
Open-minded…………………….Desperate.
Outgoing…………………………Loud and embarrassing.
Professional…………………….Bitch.
Voluptuous………………………Very fat.
Large frame………………………Hugely fat.
Wants soul mate…………………Stalker.
Adventurous……………………..Slept with everyone.
Athletic…………………………..No breasts.
Average looking…………………Moooo.
Beautiful…………………………Pathological liar.
Emotionally Secure………………On medication.
Feminist………………………….Fat.
Free Spirit……………………………Junkie.
Friendship first…………………..Former Slut.
New-Age…………………….Body hair in the wrong places.
Old-fashioned……………………No B.J.’s
Open-minded…………………….Desperate.
Outgoing…………………………Loud and embarrassing.
Professional…………………….Bitch.
Voluptuous………………………Very fat.
Large frame………………………Hugely fat.
Wants soul mate…………………Stalker.
Thunderbird Display Name in Contacts
By default, Thunderbird displays the first and and then the last name in that order in the Display name field in its Contacts. One can modify this behavior by going into the Config Editor under Advanced. This is the semi-GUI portion of Thunderbird.
Click Tools -> Options
Click the Advanced “tab”.
In the filter box, type lastnamefirst.
Double-click mail.addr_book.displayName.lastnamefirst
Change the value to true.
Double-click mail.addr_book.lastnamefirst
Change this value to one of the following options:
0 – display the “Display Name” value as the contact’s name.
1 – display Last Name, First Name as the contact’s name.
2 – display First Name, Last Name as the contact’s name.
The change should be noticeable in your address book immediately.
Click the Advanced “tab”.
In the filter box, type lastnamefirst.
Double-click mail.addr_book.displayName.lastnamefirst
Change the value to true.
Double-click mail.addr_book.lastnamefirst
Change this value to one of the following options:
0 – display the “Display Name” value as the contact’s name.
1 – display Last Name, First Name as the contact’s name.
2 – display First Name, Last Name as the contact’s name.
The change should be noticeable in your address book immediately.
This works with Thunderbird 2.
The all-powerful about:config in Thunderbird and Mozilla other offerings
http://kb.mozillazine.org/About:config
I will definitely plan on reading more on this. Other email clients offer the same customizations. Outlook has its own version of about:config, but it requires intimate knowledge of programming such as VBScript. Thunderbird uses XML which at its core is simply a plain text file. The XML parser then takes this XML file and put the settings into effect. Therefore, as long as you can understand XML syntax which is not that difficult to learn, you can be quite a “programmer” for software packages that use XML as its configuration base. I use VMware Player. I am not sure if it uses XML, but its configuration is just a plain text file as well.
A brief introduction to Google Docs
I use Google Docs (short for Google Documents) almost everyday. This is where I keep all of my work documents. This way, I can work on them while at work, and I can resume working on them when I get home (only for emergency of course). Some of these files are published to the blog here. Just to be safe, I export any really important files on GD onto my USB thumbdrive. This way, if I have no access to the Internet, I can still have access to these documents. Google backs up these files for me, but if for some reasons, the files are lost on the Google server, no matter how much I complain to Google, the files still are lost. When it comes to backing up my data, I always do it manually onto my own drives even if the data is supposedly backed up by someone else.
Remove email addresses before forwarding the email
For some email clients, when you forward an email, the text of the forwarded email appears in the body of the new message. This somewhat blurs the line between the new and the forwarded message, and replying to the original message can get cumbersome and confusing after the original email has been forwarded a few more times. In other words, the original email will get lost in the chain, or worse, it gets replicated every time it is forwarded.
Forwarding these messages as attachments however solves these problems nicely because the original message now acts like a baton in the relay foot race. No matter how many runners the baton goes through in the race, there is no confusion where the baton is. Encapsulating the original email as an attachment keeps the various people in the conversation from going off topic.
So that was a little back ground info on potential problems with forwarding an email. Now let’s talk about one side effect of making the forwarded email an attachment — at least in Thunderbird.
When you use Thunderbird version 2 with its default configuration to forward an email, the program encapsulate the original email as an attachment. This causes a problem if you want to forward an email but you do not want the recipient of this email to see some or all of the email addresses to which the original email was sent. When Thunderbird sends the original email as a attachment, there is no option to remove these email addresses. However, if you tell Thunderbird to send the original email as “inline”, you have the option to completely or partially remove these email addresses.
Tools –> Options –> Composition. Under Forward Messages, choose Inline.
The above change is now part of the configuration of Thunderbird. However, let’s say you only want to do this address removal as a case by case basis. In other words, you still want Thunderbird to send the original email as an attachment in the forwarded email, but once in a while, you prefer to remove the addresses from the original emails before forwarding it. Open the message you want to forward.
Select Message –> Forward As –> Inline from the menu. Remove the addresses as you wish.
Select Message –> Forward As –> Inline from the menu. Remove the addresses as you wish.
FreeNAS
I used to manage a computer lab at a high school with 20 iMacs running
OSX 10.4. The reason for me choosing a NAS box was the old Windows
Server 2000 machine at the time acting as the lab's fileserver had some
serious problems.
OSX 10.4. The reason for me choosing a NAS box was the old Windows
Server 2000 machine at the time acting as the lab's fileserver had some
serious problems.
Firstly, some files stored on the W2K box got corrupted. The files
themselves were fine if they were accessed on a Mac client, but when I
attached a firewire drive to the W2K machine for backup, a lot of files
got messed up. Lesson learned: don't store files created on a Mac on NTFS.
themselves were fine if they were accessed on a Mac client, but when I
attached a firewire drive to the W2K machine for backup, a lot of files
got messed up. Lesson learned: don't store files created on a Mac on NTFS.
Second, thanks to Microsoft's greed, only 10 clients can access the
server at a time. Given that there are 20 clients in this lab (more if
someone brings in their laptops), some people had to wait in line until
someone else logged off before they can access the server.
server at a time. Given that there are 20 clients in this lab (more if
someone brings in their laptops), some people had to wait in line until
someone else logged off before they can access the server.
Third. Mac data files have the resource folk and the data folk
integrated. The users in the lab work on collaborative projects where
they would color code the files for easy identification. Files saved on
the W2K machine (if not corrupted) had this color info removed.
Interestingly, under FreeNAS, if the users access these color coded file
under SMB, the colors are gone, but under AFP, the colors show up!
integrated. The users in the lab work on collaborative projects where
they would color code the files for easy identification. Files saved on
the W2K machine (if not corrupted) had this color info removed.
Interestingly, under FreeNAS, if the users access these color coded file
under SMB, the colors are gone, but under AFP, the colors show up!
Fourth. Perhaps this is why files were corrupted. The Mac OS seems to be
more liberal with naming scheme. Mac users in general love to use unsual
characters as the file names. Once a file with these "unconventional"
file names were saved onto the W2k server, it got corrupted and would
not be accessible by the very same Mac that had created it.
more liberal with naming scheme. Mac users in general love to use unsual
characters as the file names. Once a file with these "unconventional"
file names were saved onto the W2k server, it got corrupted and would
not be accessible by the very same Mac that had created it.
Fifth. The W2K server was slow serving out files. Maybe it was trying to
work its way through the protocol stack to the Appletalk one. Also,
sometimes the Mac client could not connect to the server at all.
work its way through the protocol stack to the Appletalk one. Also,
sometimes the Mac client could not connect to the server at all.
So these were the reasons I was looking for a better storage solution.
I stumpled upon FreeNAS and gave it a shot. I installed it on a P4 with
128 MB of RAM and a 20GB IDE drive. This FreeNAS file server has been in
service for nearly a year now and no problems so far. It even survived 3
unplanned shutdowns: 2 from power outages and the other because some
student yank out the powercord. It took me several tries to set it up
because FreeNAS kept telling me that there was error in mounting the
drive in the GUI, but I ignore it and it works. Basically, it's a false
positive. I could not make FreeNAS boot from a 512MB CF card attached
via IDE so I settled with a two partions scheme on this 20GB drive.
Other than a few hiccups, this FreeNAS server has been running
flawlessly. The best part is that there is no 10 users limitation. Take
that Bill Gates! Speedwise, it was definitely faster than the old
Windows server. I upgraded the NIC to gigabit as the switch in the lab
was already a Neatgear Gb switch and all the iMacs were Gb as well.
128 MB of RAM and a 20GB IDE drive. This FreeNAS file server has been in
service for nearly a year now and no problems so far. It even survived 3
unplanned shutdowns: 2 from power outages and the other because some
student yank out the powercord. It took me several tries to set it up
because FreeNAS kept telling me that there was error in mounting the
drive in the GUI, but I ignore it and it works. Basically, it's a false
positive. I could not make FreeNAS boot from a 512MB CF card attached
via IDE so I settled with a two partions scheme on this 20GB drive.
Other than a few hiccups, this FreeNAS server has been running
flawlessly. The best part is that there is no 10 users limitation. Take
that Bill Gates! Speedwise, it was definitely faster than the old
Windows server. I upgraded the NIC to gigabit as the switch in the lab
was already a Neatgear Gb switch and all the iMacs were Gb as well.
One major gripe I have about FreeNAS though is user permissions.
Although I could create groups and members to put into these groups,
they all had the same access permission (read and write) to the files!
Therefore, if one user in the lab carelessly or intentionally deleted
all files, they would be all gone! I attached a firewire hardrive to one
of the iMacs and backup all the data (18GB) everyday just in case.
Although I could create groups and members to put into these groups,
they all had the same access permission (read and write) to the files!
Therefore, if one user in the lab carelessly or intentionally deleted
all files, they would be all gone! I attached a firewire hardrive to one
of the iMacs and backup all the data (18GB) everyday just in case.
In short, other than a security "problem", FreeNAS rocks. By the way,
the people who used the lab were reminded frequently that the data saved
on the fileserver or locally on the Mac client were not secured so if
they wanted security, they had to store their files on their own USB
sticks.
the people who used the lab were reminded frequently that the data saved
on the fileserver or locally on the Mac client were not secured so if
they wanted security, they had to store their files on their own USB
sticks.
Putting a timer of multiple downloads
Sites like Rapidshare allow people to upload and download massive files.
Unfortunately unless you are a paying member, you have to wait for a
certain period of time between download. This site offers a ways to put
all those downloads in a queue so that these downloads will take turn
without your intervention.
Unfortunately unless you are a paying member, you have to wait for a
certain period of time between download. This site offers a ways to put
all those downloads in a queue so that these downloads will take turn
without your intervention.
Embedded PDF
There is a service on the Internet called PDFMeNot. It offers you the ability to view any pdf files without the need to have a PDF reader installed locally on your computer. This is great if you try to access a PDF file online on a public computer that does not have this reader installed and you have no permission to install it.
I like it for its embedded option. Basically, instead of posting a link of the pdf file on the webpage that requires the visitor to download the file and view it offline, I can embed the pdf file as an inline document. You can see an example below.
There is an inherit danger here though because for this to work, you must give permission to this website to have access to the PDF file. This is not an issue if the file in question contains no confidential info.
This embedded feature works on Internet Explorer7 and Firefox2 on a Windows PC.
There is an even better tool that does the same and more because this tool enables you to embed additional file types such as Word and PowerPoint.
http://www.scribd.com/ipaper
Copy multiple files from different locations
This is what is said on its website:
http://www.conceptworld.com/Piky/piky_features.asp
With Piky Basket, you can reduce repetitive tasks when copying/moving files and folders in Windows. Piky Basket allows you to select files/folders in to a “basket” from different locations. Once you are done selecting, you can paste them all at once to the target folders. It also allows you to selectively paste the files to the target folder.
Piky Basket is integrated with Windows Explorer. You do not have to run Piky Basket as a separate program. It can be accessed from the menu which appears by right clicking on any files/folders in Windows Explorer.
Piky Basket is a replacement for Windows file copy/paste operation
Piky Basket can save lot of time when organizing files on your hard drive
Piky Basket can be very useful when copying same set of files to different locations
Piky Basket can be used when taking backup of files and folders from different locations
Piky Basket can be used when burning a CD which requires copying of files and folders from different location
Enhancement for Windows Explorer
Let's face it, Windows Explorer is crap given the complexity of the OS.
The best you can get is a two-panel window to navigate and manipulate
files. For most people, this is fine which I guess why Microsoft has it
this way, but for a geek like myself who manipulates a lot of files in
Windows, it's a real hassle.
The best you can get is a two-panel window to navigate and manipulate
files. For most people, this is fine which I guess why Microsoft has it
this way, but for a geek like myself who manipulates a lot of files in
Windows, it's a real hassle.
Fortunately there are add-on utilities out there that enhance the
default anemic Windows Explorer. I use this free one on both my XP and
Vista systems. There are two versions of this utility: free and paid.
For my work, the free version is fine.
default anemic Windows Explorer. I use this free one on both my XP and
Vista systems. There are two versions of this utility: free and paid.
For my work, the free version is fine.
The free version gives me 3 columns. I assume the paid Pro version gives
me unlimited columns. Given that almost all computer monitors these days
are wide screen, there is enough space to display 3 or more columns.
me unlimited columns. Given that almost all computer monitors these days
are wide screen, there is enough space to display 3 or more columns.
Friday, January 08, 2010
Force a program to bind to a network card
http://www.r1ch.net/stuff/forcebindip/
ForceBindIP is a freeware Windows application that will inject itself
into another application and alter how certain Windows Sockets calls
are made, allowing you to force the other application to use a
specific network interface / IP address. This is useful if you are in
an environment with multiple interfaces and your application has no
such option for binding to a specific interface.
Saturday, December 05, 2009
Run HFS HTTP as a service
HFS HTTP is a very simple webserver. As such it is commonly used as basic a file server that is accessible over the Internet where people can both upload and download files from it. It uses the HTTP protocol, the same as a website. Therefore, the users do not need to have a dedicated FTP client program installed on their machines to get and put files into a computer that runs HFS. In fact, HFS does not even support the FTP methos at the moment.
As a server program, it is advantageous to run HFS as a service in Windows. Any programs that run as a service is functional without having a user account being logged in. Therefore, you can log out of the Windows machine and still have HFS serving out and accept incoming files.
On a side note, if you want to have better security with the files transfered out of and into HFS, you should enable SSL with the transfer. With SSL, the data is encrypted between HFS and the computer accessing it. Therefore, you can feel secured that no one can snoop on the files being transfered.
Friday, November 06, 2009
How to reset password in MacOS X
http://lifehacker.com/278898/reset-your-lost-os-x-password
- Hold Apple+S when booting to enter single user mode
- #sh /etc/rc
- #passwd yourusername
- #reboot
The commands here never asks for the admin password. I guess it's the same with doing this from booting up from the DVD because with that method, you do need to know the password to any admin accounts on the system. In fact, you can use the DVD to reset the admin account's password. So much for security! The best security is physical security and encryption, but those have their negatives.
Tuesday, September 22, 2009
Subscribe to:
Posts (Atom)
