December 28, 2008 at 10:44 PM
—
RampidByter
I was setting up my new laptop this morning and I then started to get into configuring port forwarding on my router. Because this computer is becoming another ad-hoc development machine i decided to add it to the list of PC's i have that are able to be used remotely. To do this i needed to change the default port from 3389 to a custom port number. I again went through the hassle of looking on-line for a site that had the registry path to the terminal services RDP port number setting. It was at this point that either my lazy bone or my uber programming sense kicked in and i made a quick utility to use whenever i need to set the port number again. Thus saving me the hassle of again looking up the registry path, and then skimming through the registry hive looking for the setting using RegEdit.
Here is the code to a quick Console application program i wrote that can be used through command line argument or via standard command line interface.
1: using System;
2: using Microsoft.Win32;
3:
4: namespace RemotePortChanger
5: {
6: class Program
7: {
8: static void Main(string[] args)
9: {
10: int portNumber = 3389;
11:
12: try
13: {
14: if (args.Length > 0)
15: {
16: int.TryParse(args[0], out portNumber);
17:
18: SetPort(portNumber);
19: }
20: else
21: {
22: string input = string.Empty;
23:
24: Console.WriteLine("Remote Desktop Port: " + GetPort());
25: Console.Write("Enter the new port number: ");
26:
27: input = Console.ReadLine();
28:
29: int.TryParse(input, out portNumber);
30:
31: SetPort(portNumber);
32:
33: Console.WriteLine("Port is now " + GetPort() + " press any key to exit.");
34: Console.Read();
35: }
36: }
37: catch (Exception ex)
38: {
39: Console.WriteLine("Error has occured - " + ex.Message);
40: }
41: }
42:
43: private static void SetPort(object portNumber)
44: {
45: RegistryKey key;
46:
47: key = Registry.LocalMachine;
48: key = key.OpenSubKey(@"System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp", true);
49: key.SetValue("PortNumber", portNumber);
50: key.Close();
51: }
52:
53: private static int GetPort()
54: {
55: RegistryKey key;
56: int portNumber = 0;
57:
58: key = Registry.LocalMachine;
59: key = key.OpenSubKey(@"System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp");
60: portNumber = Convert.ToInt32(key.GetValue("PortNumber"));
61:
62: return portNumber;
63: }
64: }
65: }
December 28, 2008 at 10:34 PM
—
RampidByter
While the name may be a little off the cuff i have to say CCleaner (crap cleaner) has been a very nice utility. Recently my step-brother acquired yet another virus on his laptop that like most malware utilities installed itself within one of this temp folders. I used the standard assortment of Avast, Spy-bot, Ad-aware, and now CCleaner to help get to those hard to reach temporary file locations. When running the typical assortment of anti-viral utilities the hardest thing to do is to validate that the malware/virus has been removed from all local directories. On top of that trying to locate the registry entries to the now hopefully removed files. With CCleaner the application is able to identify registry file path references that are no longer valid to be removed, among other things, and remove them within about 30 seconds. Not to mention it cleans out the contents of almost every temp file location on the system to help prevent reinstallation of the bad-ware.
This ability to remove both registry and file temp files helps ensure that when running Spy-bot, Ad-aware, and Avast that when the actual files are found then removed that nothing remains. This is not a 100% solution for removing malware or viruses but it sure helps. Running your typical virus scanner or anti-malware application can take anywhere from 10 minutes to 3 hours. With CCleaner you're able to run the application flat-out or use the analysis function to check the system for each file to be removed. The best part is it takes just mere seconds to run a complete check. In the world of waiting and waiting for a scan to complete for most applications the near instant cleaning capability is very refreshing.
December 28, 2008 at 10:00 PM
—
RampidByter
This is my first test of the Windows Live Writer application. I downloaded it then spent some time skimming through add-ins for the application. There were some pretty decent applications available, and i picked one that formats Visual Studio code and another for Polaroid style images. All in all i can't complain about the functionality. I have a very nice editor, it provides spell checking (thank you!), and i am able to preview the post before submitting. I'm going to submit this and we'll see what happens as i play with more settings, but i figured this would be a good test blogging without blogging through the .NetBlogEngine interface.
Quick follow-up. I hit the 'publish' button and it did post directly to my blog without much hassle, well no hassle, but I would have wished for the post to clear itself instead of having to go to 'File > New Post' to clear the post.
December 12, 2008 at 7:56 PM
—
RampidByter
I don’t know about you all but I can’t wait for Windows 7. I enjoy Vista as it is now; at least since I discovered the faulty RAM … that reminds me I’m sorry Vista! I saw the tech previews, the .Net 4.0 inklings, entity frameworks, multi-touch user interactivity, and the new and improved Visual Studio. Man, talk about drooling, and the whole video has me in complete rapture over the idea of getting my hands on it, not to mention some free time to play, and I couldn’t help but think. Microsoft is awesome. People call it a monopoly and say how open-source is so much better. Open-source is nice, I’ll give you that, but I make my money building tools/systems for Microsoft products and services. I couldn’t make my money anywhere else, and not to mention I wouldn’t want to.
I don’t even think it’s about making money. I wake up day to day and I go to work, I open my Windows XP notebook, and I open visual studio to another day of building something new. If I wanted to build something open-source I can, if I don’t then that is just fine too. I can build away all day, and I enjoy it. I don’t like when things don’t work, but that is half the enjoyment later in the years of easily recognizing oops mistakes. We have a large community of .Net developers, most of whom like to help each other out, and we have ways to grow and build. We have certifications, we have user groups, we have operating systems, office tools, frameworks, easy api access, and years of developers who came before us that are eager to tell us how things work.
How much better can it get? Well watch the PDC and you’ll see things are going to get so much sweeter, with functional interactive environments, and really jazzy UI programs and plug-ins. Man, every time I see something new from Microsoft like this I get energized again and again on how much I really love computers. It’s great to be a developer in this day in age.
As an aside though if you watch the video there is a lady who really enjoys saying 'super easy' a lot. I guess instead of going 'um' this lady started thinking 'super easy' was a good way to pause between thoughts before explaining where she was going with whatever functionality she was supposed to present. Just an FYI note there as it gets kind of distracting.
December 6, 2008 at 10:42 AM
—
RampidByter
I was asked recently whether I was still blogging. Yes, I am, but not that much lately. I’ve been finding myself preoccupied as of late trying to help answer questions over on the ASP.Net Forums. I’ve been doing pretty well on the points with 100 or so posts and over 500 points. You get 2 points for answering questions and 10 points for answering the question. I’ve been getting a surprising number right, and of that I’d say 70 percent of them remember to make the post as the answer. Some unfortunately forget that if I answered the question, even acknowledged by them as well, that they’ll neglect to make the answer button.
On top of that I’ve been recovering from a nasty head cold, almost bronchitis, and an infected eye gland. So I’ve been in the not so great health bracket for the last month or so. I’m not sure whether it’s been posted yet but during this time I found out some information that made me both happy and sad at the same time.
The company I used to work for has been increasingly laying people off, and I thought it was bad before I left. I would have been content there except they laid off most of the people I liked, and the one person I didn’t care for became the VP of the company. So after that and the job opening that made itself available right at the perfect time, where I’m still at, I had to leave. I left and I’ve soon found that the guy who replaced my position was laid off. Not only that but my once previous manager, who was the absolutely evangelist for this company was also laid off. I thought it was a rough go when the one was laid off, but just wow on the previous manager getting laid off. At Halloween of all things, but at least it wasn’t Christmas I suppose.
I made the right choice. I loved the client I was working with, but while there I went through three managers then at the office party I felt like I knew only so little of them. I guess the economy took it’s effect there, but I’d think it was just poor leadership directed by an individual without many scruples. What I thought was funny was on the companies blog they had a post about pulling comments and moderating them because of an individual who was posting not so great things to hear. Their reasoning was that this individual was posting too many specifics, like names, dates, and failure. One from the company even called it slanderous postings. I wouldn’t be so quick to call it slanderous since they were of course posting facts, names, and explicit failures. I’d call it fact. However, there are a great group of people there (maybe still?) and it’s hard to hear about such bad things happening to good people. When I had my thanksgiving dinner I couldn’t help but think that to myself and how lucky I am. Someone out there is and has been looking after me, and I always have to remember that.