Entries Tagged as 'Windows 7'

Using IIS to generate SSL and private key for use on Linux Systems

Windows 2008 Server , Windows 7 1 Comment »

This week I needed to renew the SSL certificate for our OpenVPN server. the process according to the docs required using OpenSSL to generate a private key, which will then be used to generate a CSR, which will then be used to register your SSL, and you then need to get the certificate (CRT) file, a CA bunble (crt) file, and a private key (pem) file to install on the OpenVPN server.

Now I am used to dealing with Windows and IIS, and dealing with SSL is a breeze on windows, but as is usually the case when it comes to Linux, simple tasks like this suddenly become 10 x more work and as my Linux skills are almost zero that made the task even more arduous.

I had a go at doing everything with OpenSSL but ended up generating invalid SSL certs that did not work, so I then thought to myself, why not just use IIS to generate the CSR and get the SSL cert and then just export it from there into a format I can use on Linux, this seemed like it would be a much quicker solution and it was, here are the steps.

Using IIS7 on any machine, generate your CSR in the usual way, I did this on my local Windows 7 machine.

generate_csr

image

 

Now take your CSR and register your SSL certificate in the usual way, when you get it back, install it on IIS from above section using "complete certificate request"

Once you have your SSL installed in IIS, you now need to export the SSL and the private key as a pfx file.

Open MMC.exe and add the certificates snap-in, now browse to the personal>certificates and export your SSL cert

image

choose to export the private key and include all certificates

imageimage

imageimage

Your private key password is your windows password that you are current logged in with.

For Windows systems this PFX file will be everything you need, however on Linux systems (such as open VPN) you will need  separate private key files.

This is where you need to use OpenSSL.

Using command line.

Export the private key file from the pfx file

openssl pkcs12 -in filename.pfx -nocerts -out key.pem

Export the certificate file from the pfx file

openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem

Remove the passphrase from the private key

openssl rsa -in key.pem -out server.key

Using XCA GUI

XCA is a handy GUI for open SSL, you can download it here http://sourceforge.net/projects/xca/

image
On the Private Keys tab choose "Import PFX", this will import everything from your PFX file.

image
Now select your newly imported private key, and click export to get your PEM file.

image
Now select your certificate and export that in required format, although in most cases the certificate file you received from the CA will be sufficient.
If you need a CA bundle, then export all the certs from the root, or use the intermediate cert you would have received from the CA.

Google Chrome slowing down my system and eating all my RAM

Windows 7 3 Comments »

I have been having some issues recently with my windows 7 system running extremely slow and becoming very unresponsive, everything would take ages, opening programs, searching, start menu, sometimes even clicking the mouse would have big delays.
Task manager showed I still had plenty of RAM and CPU though, having had such situations before I have learnt from experience  that the problem is usually caused by disk access, some program is thrashing your disk causing a bottleneck on the rest of your system.
imageOn windows 7 this is pretty easy to spot as you can run the “Resource Monitor” and look at the DISK tab and see what programs are doing the most reading and writing, and often you will also see a bunch of hard faults being caused as well.

In this case I discovered that Google Chrome was the culprit, now the only thing that chrome really needs to access disk for is the cache, so that seemed like the obvious starting point, so I cleared out my browser cache, and voila, problem went away. I then Googled the topic (irony) and found manhy others with the same issue, so it seems that Chrome does have a habit of thrashing your disk due to the cache, perhaps it gets too big ?

Shortly after this I started having RAM issues, I have 8GB RAM in my system and Chrome started consuming all of it according to task manager. On opening it would consume 1GB right off the bat, and once I had all my usual tabs open (about 10), this would jump to 3GB+, which is mental.
I had recently moved my system from HDD on to an SSD, and that is pretty much when the problem had started, so I was sure this had to be the cause.
As part of this migration I had followed a number of best practices for SSD usage, one of which is to not use a SWAP file, especially when you have a lot of RAM as I do.
Again Googling the topic found lots of others with this issue of Chrome consuming lots of RAM, and the general consensus seems to be that this is normal, Chrome uses a lot of RAM because each tab runs as a separate process to avoid a crash in one tab affect your whole browser, plus each extension consumes RAM as well.
With this in mind, it seemed that my lack of a swap file was most likely the cause here, Chrome probably uses this much memory all the time, but would usually be using virtual memory and thus the swap file so you don;t notice. So I re-enabled the swap file and rebooted my system, and voila, my memory usage has reduced by about 2GB.
The downside of this is that SSD’s have a lower lifespan than HDD and this is the reason for not using a swap file, to reduce wear on the drive, but it seems this is not viable if you use Chrome.
The other option is to reduce the number of browser tabs you have open to save memory, or install more RAM, but honestly who would think 8GB is not enough for a browser ? I think Google seriously need to work on Chrome’s memory usage, I may well have to switch to another browser now.

Windows update could not be installed because of error 2359302

Windows 7 4 Comments »

I just noticed today that my windows updates were failing with the above error, I groaned of course as windows update issues are usually a royal pain in the ass to trouble shoot.

I checked my event log and also found this error.

 

The Background Intelligent Transfer Service service terminated with service-specific error %%-2147024891

 

I then checked under services and found that that the "Background Intelligent Transfer Service" was stopped and would not start.

 

A bit of googling told me that windows update relies on BITS to work. I found all kinds of suggestions and fixes, none of which worked. After a bit of probing how windows updates works I eventually discovered that the culprit was the downloader folder "C:\ProgramData\Application Data\Microsoft\Network\Downloader".

 

Simply deleting this folder allowed BITS to start and windows update to run.

This is on windows 7, on windows xp I believe this folder is inside "c:\documents and settings" somewhere.

 

I hope this helps a few other who may have this issue.

windows 7 fails to load after partition change

Windows 7 2 Comments »

Acronis True Image Home 2010I had recently installed a new BIGGER hard drive in my laptop and used Acronis True Image Home 2010 to copy my old disk to my disk, which works very well by the way and gives you the option to resize the original partition to the new disk size, or keep the original size. Upgrading to bigger disks has always been a PITA, so this is a very easy and cheap solution to that problem.

easyideThe other issue was of course connecting up 2 disks to my notebook in order to copy them, for this I used Easy IDE, which allows you to connect any IDE disks to your USB port. the easy IDE worked great for copying my 2.5" IDE notebook drive, however I have since tried to use it to connect up old 3.5" IDE disks and it has not done a very good job of recognising them, maybe they are too old.

 

I opted to keep the original size and then create a new partition in the free space so that I could install and dual boot windows 7 along side windows XP. meaning I could switch back to XP if I had any compatibility issues.

 

Well I have been running windows 7 for several weeks now with no issues (this is my 3rd windows 7 upgrade with no issues btw), all my software worked fine, and I don't even need to run a virtual machine any longer as Windows 7 includes a fully featured IIS 7 allowing multiple sites (unlike IIS 6 which allowed 1 site only). This has made a world of difference as my laptop really did slow down considerably when my vmware virtual machine was running. Now I have no slowdown at all, and much less memory/cpu consumption and in general I find that windows 7 runs faster than XP did. I have IIS, Coldfusion, MSSQL services all set to manual and only enable then when I need to use them, this is done via a batch file on my desktop.

 

So it came time to nuke my XP partition and give the space to windows 7, this is where everything went rather tits up. I used a free tool called Gparted to do my partition deleting and  resizing.

win7_startup_repairAs a result after restarted windows could not boot due to a missing bootmanager, this was no doubt due to the that it was on the deleted partition.

So I then booted off my windows 7 CD, went into System Recovery and used the Startup Repair option to fix this, which re-created the missing bootmanager.

This then allowed windows 7 to boot, however I was greeted with nothing more than an empty blue desktop with a notice in the bottom right corner telling me that my copy of windows 7 was not genuine. No taskbar, no start menu, no desktop icons, nothing.

Like most people I started to curse at this point foreseeing a re-install, but I wasn't giving up without a fight.

The first thing I tried was to get explorer up by pressing  "windows key + R", typing "explorer" and hitting enter. This worked and I got my desktop back, albeit with broken icons. But alas I couldn't run anything, not even open my computer, getting errors about paths not existing.

So I checked task manager "shift+ctrl+esc", chose file-> new task, from where you can actually choose browse and get to my computer. It was here that I noticed my C drive had become a D drive, which was obviously the cause of my problems, as windows clearly could not load properly as it was looking for a C drive.

 

regedit The solution to this is actually quite simply, a quick registry edit to remove the existing mounted drives will then cause windows to re mount them correctly.

To do this you need to boot windows into safe mode (hit F8 before windows boots to get the boot menu and choose safe mode). From the RUN prompt type "regedit", then check the box "run this command in privileged mode".

Now navigate to "HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices", and delete the KEYS for the 2 disks which are the wrong way round (C & D in my case).

Now reboot windows normally and hopefully everything will be back to normal and you will also have a genuine copy of windows again.

 

The problem was most likely caused by deleting partitions outside of windows, what I probably should have done is delete the old partition from within windows first which would have let windows know about it so it would have then re-assigned the drive letters, and then just done the resizing via Gparted.

 

Hopefully this will help anyone else who may face thei problem and save you from a total re-install.

windows 7 Experience

Windows 7 5 Comments »

w7 I recently decided to try out the latest Windows 7 RC2 on my old PC seeing as I had migrated everything over to my new Windows 2008 server which I was using as a workstation. This plan has now turned into a fully fledged windows 7 RC2 as my primary workstation since my new 2008 machine decided to totally die, which is rather annoying as all the hardware is actually relatively new, the motherboard was 2 years old, but only just came out of the box recently and that appears to been the catalyst. Anyhoo being without a PC for any length of time is of course not an option for me so I have started to give windows 7 a good test and thought I would report my findings so far.

  

SYSTEM (32Bit)

  • Motherboard: Intel D915PBL
  • CPU: P4 3.0 ghz
  • Memory: 3gb (2.75 usable)
  • Graphics: NVIDIA Geforce 7300GS

I would have gone for 64bit but my hardware doesn't support it.

Which gives me a Windows Experience Index of 3.5, which is pretty good for such an old system.

The system actually runs just as fast as a newly installed windows XP with all the 3D and aero effects enabled, much better than windows vista performed on my newer core 2 duo system.

All hardware was detected automatically, I have not had to manually install any drivers so far.

All the software I have installed so far has not had any major issues and has generally been working. If there have been any compatibility problems then windows has informed me of this fact and has re-installed the application in windows XP compatibility mode instead, which resolved the problem.

What's Cool

minitaskswitcherWell if looks cool, essentially windows 7 is a cleaned up Vista with the pointless fluff removed and made to run fast. Aero is still there but it is faster and some of the pointless effects are simplified, turned off by default or have been removed. The windows minimize and maximize for example seems much faster and simpler, the task swapper pops up a windows with a thumb of each task, and as you toggle through the tasks with ALT-TAB or point your mouse at them, the screen changes to preview that app, but will only change to that app if you stop/click on it, otherwise it reverts back to the original app, certainly does the job nicely without the need of that silly 3D rotating gallery that vista had.

The taskbar has also had a welcome overhaul, it now combines the quick links and open applications together. You can pin any application to the taskbar much like you would have added it to the quick links toolbar, but now once you click that link to open it, it then becomes an active application on the taskbar, and clicking on it or mousing over it will show a task switcher just for that applications open windows, which is very handy for things like Internet Explorer or Windows Explorer where you will have more than one open window. It also does a very slick morph between the task switcher windows as you move between apps, all very slick and very smooth and really works well.

There are also some rather natty little tools included with windows 7 which come in very useful.

 

Snipping Tool

Animated illustration showing Snipping Tool capturing a free-form snipYou can use Snipping Tool to capture a screen shot, or snip, of any object on your screen, and then annotate, save, or share the image. Simply use a mouse or tablet pen to capture any of the following types of snips:

Free-form Snip.  Draw an irregular line, such as a circle or a triangle, around an object.

Rectangular Snip.  Draw a precise line by dragging the cursor around an object to form a rectangle.

Window Snip.  Select a window, such as a browser window or dialog box, that you want to capture.

Full-screen Snip.  Capture the entire screen when you select this type of snip.

After you capture a snip it is automaticallyatically copied to the mark-up window, where you can annotate, save, or share the snip.

I certainly find this very handy indeed as it saves me having to install any 3rd party apps to do this.

Sticky Notes

Picture of Sticky NotesAlready as necessary as pencils and paper clips, Sticky Notes just got more useful. In Windows 7, you can format a note’s text, change its colour with a click, and speedily resize, collapse, and flip through notes.

If you've got a Tablet PC or a touch screen, Windows 7 Sticky Notes support pen and touch input, too—you can even switch between different input methods within the space of a single note. Sticky Notes is available only in the Home Premium, Professional, and Ultimate editions of Windows 7. OK so it is nothing new and there have been apps like this around forever, but it is again nice to have this built in and handy for those people who never used any 3rd party note apps and still use pen and paper. For those that want something extra then there is still Microsoft One note.

Magnifier

The new magnifier I find works really well and finally how such a tool should work. Instead of just magnifying a small part of the screen as it worked in XP, it now magnifies the whole screen and scrolls the screen around with your mouse pointer, being short sighted myself I found this very handy. You still have the option of a magnifying lens of docked zoom window if you prefer.

Overall I am impressed, windows 7 seems to have the bells and whistles that you see on the Mac or Linux without being bloated. If you have an older machine that runs XP just fine but wont run vista, or even a newer machine that runs like a dog with Vista, then it will most likely run windows 7 just fine, at worst you may need a better graphics card for the aero FX or just turn them off, but based on my experience so far I certainly wouldn't waste my time with Vista now.

SOFTWARE

Here is the software I have installed so far, I will update this list as I go along.

  • Microsoft Office 2007 – for some reason outlook would not send and receive after I copied all my files and settings from old pc and Ihad to import my massive PST and recreate all my rules, acocunts, sigs etc, but that may not be a windows 7 issue.
  • Windows Live apps
  • 7-zip
  • ColdFusion 8
  • Free Download Manager
  • Genie Backup Manager
  • eWallet
  • Kaspersky Antivirus 8 (technology preview for windows 7)
  • Adobe Reader 9
  • PrimoPDF
  • Adobe Coldfusion Builder
  • Plaxo
  • Adobe Air
  • Tortoise SVN
  • CF Builder Beta
  • sync Center
  • Skype
  • Plaxo
  • Beyond Compare 3
Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds