Wednesday, September 3, 2008

Windows Vista vs. GreedyTorrent

I got a call from a friend who just installed Windows Vista, complaining his torrent program wasn't connecting to any trackers and his downloads could not start. I went over to check what the problem was and saw that he installed utorrent 1.8 along with GreedyTorrent. GreedyTorrent is a program that modifies your upload statistics sent to the trackers so the sites that require a membership and keep track of what you are uploading can be deceived. I personally do not approve this method because if you are downloading a file illegaly from someone who shares, you should pay your debt by sharing it with someone else. Anyway, who am I to judge...



The Problem
All the trackers gave the error "Proxy connect error: No connection could be made because the target machine actively refused it." I was not really sure what was causing the connection error so I started to try anything I could think of. I closed GreedyTorrent first but it was of no use. Then while going through the preferences windows of utorrent, I noticed a weird setting. My friend had set some parameters for proxy connection even though he wasn't using one. Everything went back to normal when I cleared those fields but my friend insisted on using GreedTorrent and being a leecher. Then I read the short documentation of GreedyTorrent and checked for any mistakes he could have made. It all seemed normal but the documentation was old and written for Windows XP so I thought the problem might caused by Windows Vista. The settings he made in utorrent were as in this screenshot:






The MILD Solution
GreedyTorrent suggested the users to enter "localhost" in the Proxy field of their torrent client. After some search I found out that Vista users should use 127.0.0.1 in place of localhost. So after changing the field to the given ip, everything started working normally and no connecton error occured. If you are using GreedyTorrent with utorrent in Windows Vista, your Connection tab in utorrent preferences window should look like this (unless you have entered a nmber different than 3456 in GredyTorrent's client connection port):


Although I have given a solution for a leecher's problem, it does not mean I do support leeching. Please share what you downloaded from P2P. "Sharing is caring..." ;)

Sunday, March 2, 2008

Windows (re)Activation Loop!

I have recently come up with the dumbest Windows XP error I can tell... I got a call from a relative telling that his computer won't let him log on to his Windows XP account and ask for some activation which he had no idea of. I thought that a simple corruption went on his registry and could be fixed by activating his Windows over Internet, some lame problem... But when I went over to check it out, I've seen that it was a much worse case then I've thought.

The Problem
Everything went normal until the log on screen of Windows XP. But when the preferred user account is clicked, the error message appeared telling that the Windows installed must be activated before user could log on. That’s okay, but the next window that popped out read "Your copy of Windows is already activated" and then it kicked out back to the log on screen. So this became a never ending loop and restricted access to Windows which directly restricted access to the registry and the relevant files that could fix this issue.


The Mild Solution
Then I tried to open Windows in Command Prompt and magically it worked. Actually it first sent me to the log on screen again (which made me think that it didn't work and a format would be necessary) but then after clicking on the Administrator account, the Command Prompt window came up. Now the challenge was to find which file had to be edited. After some search on the web I found out that actshell.htm was the file..!

The file is located under: "..\WINDOWS\system32\oobe"
To edit the file under command prompt you simply have to type in "edit actshell.htm" while you are in the \oobe directory. Such a window will open:

Now click Search on the top menu (yes your mouse is still working) and select Find. Type in "Already" and press F3 button until you locate the following codes in line 3609:

if (g_Already_Activated == 0)
{

SetupPageLayout();
InitFrameRef();
g_status = STATUS_OFF;
g_DoActivation = false;
InitCKPT();
if (0 != DirObj.get_AppMode)
{
do
{
PopCKPT();
}
while (null != g_CurrentCKPT);
}
GoNavigate(CKPT_ACTDONE);
SetTimerShowIFrame(900);
}
else if (g_Already_Activated == 999)
You will have to change the if (g_Already_Activated == 0) to if (g_Already_Activated == 1)
So a simple change from 0 to 1 will solve your problem. Now click File on the top menu and select Save. Close the Command Prompt and restart your computer normally.
It must bring up and error telling that you must activate Windows to continue again but this time after clicking OK, the usual activation window shall come. Now you can go on and activate your Windows using your product key...

Friday, February 29, 2008

Unchain Your ".hta" Extension!

I'll try to aid you to a solution of an error I've come up with during the creation of an .hta application. So keep on reading, for which you might find a solution to yours that you've never thought would be relevant.


For Newbies:
What is an .hta application? How does it work?

Basically, it is an html page with the priveleges of running real applications. You can make the .hta files do several things using VBScript. And the best part is: the design is almost just about html coding!
You might think that some users with bad intentions (a.k.a. lamers) could create web pages using .hta and spread their viruses all around, but thats totally wrong. These files are not actually run directly by your web browser, so you're safe!


The Problem & The Mild Solution:
While editing the autorun.hta file of our product Infraskope's Setup CD, I've come up with a weird error message. Here is the whole story:

Infraskope is a product that is made up of several components. So you have to go through several setup files to complete your installation on the main server. Our aim was to create such an .hta application that by a single click on the "Install" link/button it would go through the setup process by itself, one by one and in given order. Not a silent intallation of course, but more like an automated installation ordering the setup files to run one after another.

I've edited the previous .hta file we used and added some lines of code to run an application. Later, when I tried to run and test the file, I've came up with such a message after clicking on the Install button:
I've decided to try the file on another computer and the error message did not come up. So I knew the codes were clean but there was something weird going on in my computer. I made a comparison between my computer and the one that ran the file with no errors and noticed that my computer gave me a security warning before running the hta files and the other one did not.

Whenever an .hta files is to be run, my computer gave me this warning:

Do you want to run or save this file?


That was not supposed to be asked! If you take another look at the first image, you will see that it gives the error message for itself. It says it cannot find itself! So while searching, I've found out that the hta files were actually handled by a file called mshta.exe (which I think is based on IE), but my computer tried to run the .hta application directly by Internet Explorer. And for the security reasons (the previously mentioned lamers spreading virus scenario) IE is not allowed to run the .hta files without your permission. So here is what happened roughly:
1) I double clicked the autorun.hta file.
2) It asked for my permission to run it.
3) I clicked on the install button.
4) The .hta application tried to run the program I linked in the codes but could not get the permission from IE so gave the error message.

After finding this out, the solution was pretty much easy. I right clicked on a random .hta file, selected Open With -> Choose Program. Clicked on Browse and located the mshta.exe file in ...\Windows\System32\. Before clicking OK and running the file, I selected the "Always use the selected program to open this kind of file" checkbox.
Bingo! It all went back to normal... I hope that helped.

"Hello World!"

So...
Here we go with this new, shiny blog... Unless many other failures out there, I'll try to update this one as frequent as possible and keep the recent "IT" incidents I've come up with up to date. My main intention in creating this blog is sharing information on how I've solved the problems I've come up with during my "neoteric"* life. I had times searching the web for days for an appropriate solution... With this blog, I'm hoping to help people access the information they need easier.
I'll also change the layout a.s.a.p. and give this blog a better look. So for now... take care you all.



*Neoteric: Modern
(...Guclu's Modern Life? Hmmm, does that sound familiar to you as well?)