Wednesday, November 12, 2008

You've Been Baselined

Why is baselining important? To be able to record the difference made by hardware or software changes (installing more memory, installing google desktop), also knowing the baseline of my own personal computer has helped me to detect viruses before (there's a post earlier in this blog about that). It is also helpful in recognizing bottlenecks, so that work can be done to overcome those.
I was unable to rate my virtual Vista with the index due to an error, probably an error related to it being a virtual machine, but here you can see the vital stats of the machine.

Here you can see the usual activity, if you let Windows have it's way for a few minutes. It's interesting to note the jumps when I made the image in paint...


The bottom line: Windows just can't leave itself alone.

Baselining may not be too important on a personal computer, but it is much more useful in a business setting.

Wednesday, November 5, 2008

Going into stealth mode

We took a troubleshooting lab today, and I was able instantly to figure out what was wrong because the script we were told to run to "break" our computers showed it's output in the DOS box. Because the script had a significant pause during execution, it showed exactly what it was doing, so rectifying that was very simple. Due to this, I wondered if it would be possible to hide the execution of a script. I did a little Googling and this is what I discovered.

Failed Attempt:

I at first wanted to completely hide the DOS box from coming up at all, however from what I read this is simply not possible with a batch file. Then I came across a solution that suggested using the redirect symbol after the command to pipe the output to NULL. This method does show a DOS box, but hides the output. So, say you wanted to delete a file called trash.txt with a batch file, without revealing in the DOS box that you were doing so. In this case your batch file would contain:

@echo off ; prevents the command itself from being displayed
del trash.txt >NULL

and this would execute the command while directing the output to nowhere. However, when I tried this method, it merely made a file called NULL with the output in it. It did hide the output in the DOS box, but created a useless file, which was not my intention. Closer, but no cake.

The Real Deal:

I modified my Google search to be "redirecting output to null" or something along those lines, and quickly came across the true answer. You have to redirect the output to NUL with one L, not NULL with two. After testing this method, I found that it did indeed work. So, in the example above, the batch file would contain this:

@echo off ; prevents the command itself from being displayed
del trash.txt >NUL

This would send the output to nowhere, while not affecting the execution of the command. I like this solution because it is simple and easy. A DOS box will still flash up momentarily, but it will open and close much faster than it would otherwise, and no text will be displayed.

Be warned that I at least would not want a normal program to be flashing empty DOS boxes during execution - that would make me very suspicious. A batch file setting up a debugging test is a different matter, and is in honesty the only real use I can see for this. If you want to suppress a spam of text in a window by using this, I would suggest that you alert the user to this, possibly with some @echo commands and maybe a pause so they have time to read it. That however goes beyond the scope of this blog.

Here is a link to a much deeper guide about using redirection, with links to many more tutorials about scripting in a shell:
http://windowsitpro.com/article/articleid/20530/shell-scripting-101-lesson-4.html

Friday, October 10, 2008

Vista thinking too much

Recently I had a problem with Vista. It would be accessing the hard drive and using CPU time, bogging down my computer, at times when I was using it myself. I assumed this was some of Vista's "helper" proccesses, such as search indexing, and was quite annoyed that it would be running those sort of things while I was using the computer.

Hypothesis: I strongly suspected Vista itself, running some proccess to "assist" me or something.

Test: I started closely monitering the resource moniter window (new in Vista, and I really like it) for things running when they shouldn't be, hoping through the disk access or proccesser time use that I would be able to catch who was using the resources.

Result: This method worked, but at the same time proved invalid my original hypothesis. I found the proccess that was using resources, actually I caught it in the Network section, but it wasn't a silly Vista helper proccess - it was rundll32.exe. Knowing what I do about rundll32.exe, I knew that the real culprit was adware or spyware. I was having problems with my virus scanner, so I had disabled it previously. I now went back to there website, and found out that for some reason they had changed the 64bit version from 3.0 back to 2.7, perhaps the 3.0 wasn't working on 64bit and that's why the spyware or adware had gotten through in the first place, and why it was giving me problems before.

I uninstalled the antivirus version 3.0, installed the newly downloaded version 2.7, and ran a scan. It quickly found several infections of an adware program, in memory and on disk. It made the necessary fixes and I restarted. Now I have a running antivirus / spyware and adware remover and I haven't had any problems since.

Conclusion: If your Vista seems to be accessing the hard drive or using the internet more than it should be, you most likely have spyware or adware. You can access the resource moniter by pressing Ctrl-Shift-Esc, going to the Performance tab, and clicking the Resource Moniter button partway down the page. If a rundll32.exe proccess accesses the hard disk or more particularly the internet, it's almost certain. rundll32.exe is very often used by viruses, adware, and spyware to hide under a seemingly legitimate proccess. Keep in mind however that rundll32.exe is in fact a Windows proccess and is used by legitimate programs at times, including windows itself.

Also, if you are using the same antivirus that I am (ESET NOD32, see a previous blog) under a 64-bit environment, make sure you are using 2.7 and not 3.0, at least as of this writing.

Here's a page explaining in greater detail the Resource Moniter and it's uses. It's a pretty good article.

http://articles.techrepublic.com.com/5100-10878_11-6121730.html

Monday, October 6, 2008

ESET NOD32

ESET NOD32 is my new favorite antivirus. It is comparativly small and fast, using few system resources, and works on any Windows OS, including 64-bit. My last antivirus I had to stop using as they did not support 64-bit operating systems. NOD32 is always up-to-date, as any worthwhile antivirus, and includes a variety of security options such as email scanning, http scanning, real-time scanning, and a thorough on-demand scanner. ESET also offers many other security products for home and business.

ESET Home: http://www.eset.com/

Sounds a bit like an ad, but really I just like them.

Friday, October 3, 2008

Troubleshooting Lab

Initially I could not log onto the John Smith account, Vista said the username or password was incorrect.

Hypothises: Since I was not typing in the username, I knew it had to be the password. I logged in as administrator and changed the password for John Smith.

Solution: After changing the password I could log in as John Smith.

After running the second script, I tried to edit the file and was denied access: Vista said the file could not be created.

Hypothises: Folder permissions might be denying John Smith access.

Attempt #1: I logged in as administrator and added the "Users" group to folder permissions and gave the group full access.

Going back to John Smith, I was still unable to edit the file, so the access permissions did not solve the problem.

Attempt #2: The only other reason I know why I wouldn't be able to change a file is if it was read-only.

I checked the attributes and the fale was read only. After turning that off, I was able to edit and save the file.

I thought at first that it was a combination of the two that had fixed it, the folder permissions and the read-only, so I went back to Administrator and undid the permissions changes. After logging back on as John Smith however, I was still able to edit the file, so it was only the read-only attribute that was preventing me from saving it.

Solution: I just had to turn off the read-only attrubute. I was overthinking the problem.

Wednesday, October 1, 2008

Creating multiple users in Vista

In many cases there are times when you might want to use some automaitc method to create many user accounts at once rather than creating each user by hand. The example I found on the Internet cited adding new students into a computer system each semester.

Hypothises

This should be possible with a script. Almost everything can be scripted.

I found a place online that describes this proccess:
http://szone.berlinwall.org/NetAdmin/BulkUserCreationSmall

I have not yet tested this, but will update this page when I do.

Wednesday, September 24, 2008

Pin to Start Menu: A Cautionary Tale

This post involves a couple of items that may not be familiar to everyone, so I'll go over those before I begin.

Number one is a computer game, Oblivion. It's a single-player RPG, the fourth in a fairly popular series.

Number two is OBSE (Oblivion Script Extender), a program that loads Oblivion on top of itself using a hooking DLL method, thereby extending the scripting commands available to third party modders to further extend the modability of Oblivion.

Now that we've got those covered, on to the main portion of this post. My brother had Oblivion installed on his computer, with OBSE, but had not used it on some time. While I was there, he wanted to set it up to play again, however the start menu items had dissapeared, so knowing that OBSE had to be run to make the scripts that used them work, he right clicked on the OBSE loader in the file browser and chose "Pin to Start Menu", and Windows of course complied. However, upon clicking on the link just pinned, it came up with an error about not being able to find Oblivion.exe.

My initial solution was to reinstall OBSE, thinking that it was somehow corrupted or had bad settings, as I could clearly see that the Oblivion.exe file was right there. After updating, I double-clicked OBSE in the file browser and Oblivion worked fine, so I assumed it was fixed.

It took me until the next morning to realize my mistake. Pin to start menu does NOT make a shortcut, it pins the actual file to the start menu, so OBSE, which requires Oblivion to be in the same folder, could not find it in the start menu folder. Later testing verified this - clicking on OBSE in the start menu still caused the same error, but running it from the file browser worked fine.

Final Solution

The real solution to this is to make a shortcut to what you want in the start menu right in the folder it is in. You can do this by right clicking on the file and choosing the Create Shortcut option. Then pin the shortcut you just created to the start menu rather than the file itself. In this way you can also rename the shortcut and give it a different icon, as in the case of OBSE_Loader.exe, the name nor icon is very descriptive of what it does, so I changed the name of the shortcut to Oblivion and the icon to the Oblivion icon, taken from Oblivion.exe.

Conclusion: Be careful what you pin to the start menu; you may have unexpected results.

Wednesday, September 17, 2008

Disk Storage Technology

If a hard drive is partitioned, the first sector is a Master Boot Record. If it is not partitioned, it is called a Volume Boot Record. MBR's are used for:

Holding a partition table

Booting the operating system

Giving each disk a 32-bit signature

The MBR is not part of any partition.

For more information on MBR's, including how to repair a broken one or creating your own with a disk editing utility, see Wikipedia's article.

Monday, September 8, 2008

My First Blog!

My name is Quentin. I'm from Colebrook, New Hampshire.
If I had a thousand dollars, I would probably spend it on tutition.
I spend a lot of time with computers, they are my number one hobby. I also skateboard a little, and I am hoping while I'm at college to get into gym climbing. I have a lot of computer background - I grew up with computers since my dad repaired and resold them, and also worked as a programmer. I wrote my first functioning program before I was in young mens.
This next Wednesday we are installing Vista on our virtual PC's, which should be interesting since I've done it ohhh 20 times or so. So far I like this class quite a bit. Being on the projector was interesting. My initial reaction to the class is: I think this will go well.

Here is a picture.