Archive for the Category » vinduer «

Friday, September 11th, 2009 | Author:

Peace in the land of USB

Under a *nix operating system, having multiple partitions on a USB drive isn’t rocket science, it just works. I mit tilfælde, my USB drive has two partitions because the first partition is a bootable Arch Linux installer.

I have Windows on a desktop at homemostly for gamingand many of my colleagues use it too. Since Windows doesn’t do very well with non-Windows partitions I figured I could create a FAT32 partition on the memory stick after the bootable Arch Linux partition. FAT32 is almost ubiquitous and is usable on every common desktop operating system in the world.


Unfortunately it doesn’t work straight off the bat. Apparently, Microsoft in their infinite wisdom decided that memory sticks are supposed to have one (and only one) partition. In reality Windows finds the first partition and then ignores any others that happen to be set up:

Please Format

Err, no, I do not want you to format my Arch Linux installation partition

The trick to getting it working is to fool Windows into thinking the device is ikke a regular USB memory stick but perhaps a solid-state hard disk which happens to be connected via USB. Yes I know, this is seriously stupid that Windows behaves this way. A solid-state hard disk is just a whopping big (and fast) memory stick after all!

I found a few sources on how to do this however I still had to figure out some things on my own. Specifically, the guides I found either skipped some steps or didn’t provide enough information on where to download the driver package.

This procedure involves manually changing hardware drivers and installingnon-signeddriversnot intended for your hardware”. I know someone is going to break their system and blame me so I say now that I take no responsibility for any damage you may do to your Windows system as a result of this. Read that again. 😛


remove the highlighted text

click for larger version

Download and unzip the driver, originally created by Hitachi, her. Open the cfadisk.inf file in notepad (or your favourite plaintext editor), and find the section labeled [cfadisk_device]. Remove the section highlighted on the right:

Minimize (don’t close) the editor and go to your desktop iconsright-click on My Computer and select Prdriftsaktiver. Select the hardware tab and then select [Device Manager]:

System Properties

Find the device underDisk drives”, right-click your memory stick and select Prdriftsaktiver:

Device Manager

Click the Details tab and in the dropdown box on that page, selectHardware Ids”. Click the first line in the list of Hardware IDs and press Ctrl+C to copy the name:

USB Hardware Ids

Don’t close this dialog, go back to notepad (which was minimised) and paste the hardware ID into where the previous content was removed.

Changes pasted into notepad

Save the file in notepad and go back to the device’s property dialog window. Click theDrivertab and click the [Update Driver…] button. In the windows that pop up, selectNo, not this time”; [Next] -> “Install from a list or a specific location (Advanced)”; [Next] -> “Don’t search. I will choose the driver to install.”; [Next] -> [Have Disk…].

Unsigned Drivers - Click Continue Anyway

Browse to the folder where you have saved the modified cfadisk.inf file. Klik [OK]. You will find

there is a Hitachi Microdrive driver listed. Select this and click [Next]. When the warning

appears, click [Yes]. Another warning will pop up regarding a similar issue (these are theunsigned” og “not intended for your hardwarewarnings I mentioned earlier). Klik [Continue Anyway]:

At this point I recommend closing all the dialog boxes related to the setup. Finally, remove and re-insert the memory stick into your USB port and you should find that the extra partitions on the stick are accessible. In the worst-case scenario, you might still need to partition the disk however the hard part is over. 🙂

Monday, April 06th, 2009 | Author:

I came across 2 bugs on Windows Server 2003 that are also relevant to Windows XP.

Short Circuits

1. Internet Explorer‘s Desktop icon is disabled. When you double-click on the icon, expecting IE to launch, it simply produces an additional shortcut. Subsequent double-clicks again produce more shortcuts. It is possible, as a workaround, to launch IE from the Start Menu.

My first guess was that malware was attempting to make me click on these new shortcuts where the new shortcuts opened further malware. This idea quickly faded though since, if malware were to have the system privileges to produce these symptoms, it wouldn’t need me to provide further privileges.

I eventually found her what the actual problem was. I mit tilfælde, the cause was related to IE6 being outdated. If a Windows registry entry is namedLegacyDisableand is added to specific types of registry keys, it lets Windows know that the key is obsolete and that it has only been left behind for backwards-compatibility. I dette tilfælde, it disabled the intended primaryverbfunction (the double-click) of the shortcut: launching IE.

To fix, you can either update to the latest version of IE or fix the registry entry directly. If you experience this issue even with the latest version of IE then the registry value is the only way I know how to fix it.

Danger, Will Robinson!

Though this is a trivial registry change, the registry is still a dangerous thing to mess with so, as usual, back up your registry: See KB322756. Nobody gets to blame me for trashing their system. 😛

De-Register me!

Paste the following into a .reg file and execute it; or manually remove theLegacyDisableentries referred-to here:


Fire me up!

2. When trying to browse to any site from within IE, IE remains dormant while Firefox is launched. Firefox then loads the page which was originally requested in IE.

While many might most of the time consider this to be a triumph [insert childish laughter here], the site I wanted to browse to was the Windows Updates site which, unfortunately, does not work when using Firefox. The same would apply to other sites which depend on the web browser supporting ActiveX.

De-Register Me Too!

I eventually found the solution her, and it turns out to be similar to the solution for the first bugexcept that it is to remove an entire key. Again, ensure you have a backup of your registry before continuing. Here is the relevant content of the .reg file:


I hope that resolves things for anyone else having similar issues. 🙂

Wednesday, March 18th, 2009 | Author:

[edit] So much for that. It turns out that openssl is able to determine that the key and certificate are already in a single file. Therefore, no csplitting required (godt, I hope somebody reading this at least learned about how nice csplit is). In fact, the whole script might as well be obsoleteblaargh. Well, at least it gives a nice warning about not giving a blank passphrase. 😀

Here’s the new version:

pem2pfxconverts a .pem-formatted file containing a private key and signed certificate into a Windows-compatible .pfx certificate file.

#Tricky -
# Converts a .pem certificate file to .pfx format
# $1 is the source file
set -e
if [ $# = 1 ]; derefter
  outputfile=`echo $1 | sed 's/.pem$/.pfx/'`
  echo "Please specify a password below. Windows refuses to import a .pfx certificate with a blank password."
  openssl pkcs12 -export -out $outputfile -i $1
  echo "pem2pfx - konverterer en .pem formateret private nøgle og certifikat-fil til en IIS-kompatibel .pfx fil."
  echo "Usage: pem2pfx inputfile.pem"


Lørdag, Februar 21, 2009 | Author:

De relativt nye dokumenttyper Kontor 2007 har givet Nogle værter problemer, når deres kunder ønsker at tilbyde dokumenter til download. Oftest, dokumenterne bliver tilbudt af webserveren som “text / html” som derefter gengives som et ton af skrald på nettet brugerens skærm.

Den bedste måde at løse dette er at tilføje alle de MIME typer til serveren vigtigste konfiguration. IIS7 til Windows har allerede disse MIME-typer konfigureret rigtigt som standard. IIS6 og IIS5 kræver de MIME-typer, der skal tilføjes, Som det kunne Apache på ældre anlæg. For Apache, er der også en løsning for den enkelte domæne ejeren til at tilføje MIME-typer via Apaches .htaccess fil.

IIS 6 MIME-type tilføjelse (for serveradministratoren)

Før dette kan gøres, sikre, at din server også er indstillet til at tillade direkte metabasen redigering:

  1. Load IIS Manager: Start -> Run, “inetmgr” -> [OK]
  2. Højreklik på “server” og klik “Prdriftsaktiver”
  3. Inden for “Internet Information Services” fane (normalt kun fanen), sikre, at “Ognstand Direct metabase Edit” afkrydsningsfeltet er markeret.
  4. Klik [OK]

Vær sikker på at back up IIS konfiguration (her for IIS5) forhånd. Jeg vil ikke tage noget ansvar for en admin bryde sin server. Jeg har grund til at tro dette kan også arbejde på IIS5 men jeg har lige så meget grund til at tro, at det bare kan give masser af fejl. Hvis et IIS5 / Windows 2000 admin er villig til at teste dette for mig efter sikkerhedskopiering konfigurationen, så lad mig vide om resultaterne.

Kopier følgende tekst i en fil med navnet msoff07-addmime.vbs og udføre den gang fra kommandolinjen ved at skrive cscript msoff07-addmime.vbs og trykke på Enter. Hvis du kører det mere end én gang, de MIME-typer vil blive tilføjet hver gang, og du vil få flere identiske poster:

»Dette script tilføjer den nødvendige Office 2007 MIME-typer til en IIS 6 Server.
"For at bruge dette script, blot dobbeltklikke på eller udføre det fra en kommandolinje.
»Kørsel dette script flere gange resulterer i flere poster i
»IIS MimeMap, så du ikke skal køre det mere end én gang.
»Modificeret fra
Ingen MimeMapObj, MimeMapArray, MimeTypesToAddArray, WshShell, oExec
'Sæt de MIME-typer, der skal tilføjes
MimeTypesToAddArray = Array(".docm", "application /", _
".docx", "Ansøgning / vnd.openxmlformats-officedocument.wordprocessingml.document", _
".dotm", "application /", _
".dotx", "Ansøgning / vnd.openxmlformats-officedocument.wordprocessingml.template", _
".potm", "Application /", _
".potx", "Ansøgning / vnd.openxmlformats-officedocument.presentationml.template", _
".ppam", "Ansøgning /", _
".ppsm", "Application /", _
".ppsx", "Ansøgning / vnd.openxmlformats-officedocument.presentationml.slideshow", _
".pptm", "Application /", _
".pptx", "Application / vnd.openxmlformats-officedocument.presentationml.presentation", _
"SLDM", "Application /", _
"Sldx", "Ansøgning / vnd.openxmlformats-officedocument.presentationml.slide", _
".xlam", "application /", _
"Xlsb", "application /", _
"Xlsm", "application /", _
".xlsx", "Application / vnd.openxmlformats-officedocument.spreadsheetml.sheet", _
"Xltm", "application /", _
"Xltx", "Ansøgning / vnd.openxmlformats-officedocument.spreadsheetml.template") 
»Få mimemap objekt
Sæt MimeMapObj = GetObject("IIS://Localhost / MimeMap")
»Ring AddMimeType for hvert par af udvidelse / MIME-typen
For skranke = 0 til Bound(MimeTypesToAddArray) Trin 2
    AddMimeType MimeTypesToAddArray(skranke), MimeTypesToAddArray(skranke+1)
'Opret en Shell objekt
Sæt WshShell = CreateObject("WScript.Shell")
"Stop og Start IIS service
Sæt oExec = WshShell.Exec("Net stop w3svc")
Af Mens oExec.Status = 0
    WScript.Sleep 100
Sæt oExec = WshShell.Exec("Net start w3svc")
Af Mens oExec.Status = 0
    WScript.Sleep 100
Sæt oExec = Intet
»Rapporter status til brugeren
WScript.Echo "Microsoft Office 2007 Dokument MIME-typer er blevet registreret."
'Under AddMimeType
Nedenfor AddMimeType (Ext, Mtype)
    »Få kortlægninger fra MimeMap ejendom.
    MimeMapArray = MimeMapObj.GETEX("MimeMap") 
    »Tilføj en ny kortlægning.
    i = Bound(MimeMapArray) + 1
    Kom fedt Bevar MimeMapArray(i)
    Sæt MimeMapArray(i) = CreateObject("MimeMap")
    MimeMapArray(i).Udvidelse = Ext
    MimeMapArray(i).Mimetype = Mtype
    MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", MimeMapArray
End Nedenfor

Apache MIME typen tilføjelse (for serveradministratoren)

Apache gemmer sine MIME-typer i en fil normalt placeret på $installpath / conf / filerne 'mime.types'. Se mod_mime dokumentation for mere om, hvordan det fungerer. Arch Linux installerer sine MIME-typer på /etc / httpd / conf / filerne 'mime.types' og Parallels Plesk installerer det i /usr / local / PSA / admin / conf / filerne 'mime.types'. Din fordeling kan have det i et andet sted, så find din filerne 'mime.types' fil ved at køre lokalisere filerne 'mime.types'.

Tilføj følgende linjer til din filerne 'mime.types' fil:

application/                          docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document   docx
application/                          dotm
application/vnd.openxmlformats-officedocument.wordprocessingml.template   dotx
application/                    potm
application/vnd.openxmlformats-officedocument.presentationml.template     potx
application/                       ppam
application/                   ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow    ppsx
application/                pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/                       sldm
application/vnd.openxmlformats-officedocument.presentationml.slide        sldx
application/                            xlam
application/                     xlsb
application/                            xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet         xlsx
application/                         xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template      xltx

Apache MIME typen tilføjelse (For domænet ejeren med mindst FTP adgang – hjælp .htaccess fil)

Tilføj følgende tekst til dit domænes .htaccess fil, mest almindeligt i en httpdocs / Vejviser

AddType ansøgning / docm
AddType application / vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application / dotm
AddType ansøgning / vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType ansøgning / POTM
AddType ansøgning / vnd.openxmlformats-officedocument.presentationml.template potx
AddType ansøgning / MISP
AddType ansøgning / PPSM
AddType application / vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType ansøgning / PPTM
AddType application / vnd.openxmlformats-officedocument.presentationml.presentation PPTX
AddType ansøgning / SLDM
AddType application / vnd.openxmlformats-officedocument.presentationml.slide sldx
AddType ansøgning / xlam
AddType ansøgning / xlsb
AddType ansøgning / xlsm
AddType application / vnd.openxmlformats-officedocument.spreadsheetml.sheet XLSX
AddType ansøgning / xltm
AddType ansøgning / vnd.openxmlformats-officedocument.spreadsheetml.template xltx
Wednesday, January 28th, 2009 | Author:

I’m very happy to report that 2 much-needed and related features I’d filed bugs for at KDE’s Bug Tracking System bugzilla were added to KDE 4.2‘s KRDC. KDE 4.2 was just released and is now available within kdemod (aka Chakra)’s repositories. KDE-loving *nix-loving Windows administrators rejoice!

  • Ability to specify a default Username: Previously, before logging in, you’d be prompted for the username. Now the prompt is automatically filled in with a default username.
  • Ability to recognise LDAP logins and remember the password using kwallet as an LDAP Login.
KRDC options added

New KRDC options added

A very big thank you to the developer maintaining KRDC, Urs Wolfer.