Arhivu za kategoriju » prozori «

petak, September 11th, 2009 | autor:

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. U mom slučaju, 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.

Bleh

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, ne, 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 ne 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. 😛

Instructions

remove the highlighted text

click for larger version

Download and unzip the driver, originally created by Hitachi, ovdje. 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 Prsvojstva. Select the hardware tab and then select [Device Manager]:

System Properties

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

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”; [Nlokal] -> “Install from a list or a specific location (Advanced)”; [Nlokal] -> “Don’t search. I will choose the driver to install.”; [Nlokal] -> [Have Disk…].

Unsigned Drivers - Click Continue Anyway

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

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

appears, click [Yes]. Another warning will pop up regarding a similar issue (these are theunsigned” i “not intended for your hardwarewarnings I mentioned earlier). Kliknite [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. 🙂

udio
ponedjeljak, April 06th, 2009 | autor:

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 ovdje what the actual problem was. U mom slučaju, 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. In this case, 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:

[HKEY_CLASSES_ROOT\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\NoAddons\]
"LegacyDisable"=-
 
[HKEY_CLASSES_ROOT\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage]
"LegacyDisable"=-

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 ovdje, 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:

[-HKEY_CLASSES_ROOT\CLSID\{C90250F3-4D7D-4991-9B69-A5C5BC1C2AE6}]

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

udio
Wednesday, March 18th, 2009 | autor:

[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, ne csplitting required (dobro, 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.

#!/bin/bash
#pem2pfx
#v0.2
#lukav - brendan@swiftspirit.co.za
# Converts a .pem certificate file to .pfx format
# $1 is the source file
set -e
 
if [ $# = 1 ]; then
  outputfile=`echo $1 | sed 's/.pem$/.pfx/'`
 
  echo "Please specify a password below. Windows odbija uvoz .pfx certifikata s praznom lozinkom."
  openssl pkcs12 -izvoz -napolje $outputfile -u $1
 
 inače
  echo "pem2pfx - pretvara .pem formatirani privatni ključ i datoteku certifikata u .pfx datoteku kompatibilnu sa IIS."
  echo "Usage: pem2pfx inputfile.pem"
biti

više…

udio
Subota, 21. februara, 2009 | autor:

Relativno nove vrste dokumenata Office 2007 zadao je problem nekim web domaćinima kada njihovi klijenti žele ponuditi dokumente za preuzimanje. Najčešće, dokumente web server nudi kao “text / html” koja se zatim na ekranu korisnika interneta prikaže kao tona smeća.

Najbolji način da se ovo riješi je dodavanje svih MIME tipove do glavne konfiguracije servera. IIS7 za Windows već ima ove MIME tipove postavljene prema zadanim postavkama. IIS6 i IIS5 zahtijevaju dodavanje MIME tipova, kao što bi moglo Apache na starijim instalacijama. Za Apača, postoji i zaobilazno rješenje za pojedinačnog vlasnika domene da doda mimeove vrste putem Apache-a .htaccess fajl.

IIS 6 Dodavanje MIME tipa (za administratora servera)

Prije nego što se to može učiniti, pobrinite se da je i vaš server postavljen tako da dozvoljava direktno uređivanje metabaze:

  1. Opterećenje IIS Manager: Start -> Ra, “inetmgr” -> [uredu]
  2. Desni klik na “server” i kliknite “Strrsvojstva”
  3. Unutar “Internet informativne usluge” tab (obično jedina kartica), osigurati da “Enmogućnost Direct Metabase Edit” potvrdni okvir je označen.
  4. Kliknite [uredu]

Obavezno sigurnosna kopija IIS-ove konfiguracije (ovdje za IIS5) unaprijed. Neću preuzeti odgovornost za administratora koji je razbio njegov server. Imam razloga da vjerujem u ovo svibanj također radim na IIS5, međutim imam isto toliko razloga vjerovati da bi to moglo samo dati puno grešaka. Ako je IIS5 / Windows 2000 admin je spreman ovo testirati umjesto mene nakon izrade sigurnosne kopije Vaša konfiguracija javite mi rezultate.

Kopirajte sljedeći tekst u datoteku koja se zove msoff07-addmime.vbs i izvršite ga jednom iz naredbenog retka upisivanjem cscript msoff07-addmime.vbs i pritiskom na Enter. Ako ga pokrenete više puta, MIME tipovi će se dodavati svaki put i imat ćete više identičnih unosa:

'Ova skripta dodaje potreban Office 2007 MIME tipovi u IIS 6 server.
'Da koristim ovu skriptu, samo dvaput kliknite ili izvršite iz naredbenog retka.
'Pokretanje ove skripte više puta rezultira višestrukim unosima u
'IIS MimeMap, pa ga ne biste trebali pokretati više od jednom.
'Izmijenjeno sa http://msdn.microsoft.com/en-us/library/ms752346.aspx
 
Dim MimeMapObj, MimeMapArray, MimeTypesToAddArray, WshShell, oExec
Const ADS_PROPERTY_UPDATE = 2 
 
'Postavite MIME tipove koji će se dodati
MimeTypesToAddArray = Array(".docm", "application/vnd.ms-word.document.macroEnabled.12", _
".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", _
".dotm", "application/vnd.ms-word.template.macroEnabled.12", _
".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", _
".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12", _
".potx", "application/vnd.openxmlformats-officedocument.presentationml.template", _
".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12", _
".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", _
".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", _
".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12", _
".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation", _
".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12", _
".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide", _
".xlam", "application/vnd.ms-excel.addin.macroEnabled.12", _
".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12", _
".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12", _
".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", _
".xltm", "application/vnd.ms-excel.template.macroEnabled.12", _
".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template") 
 
'Nabavite objekt mimemap
Set MimeMapObj = GetObject("IIS://LocalHost / MimeMap")
 
'Pozovite AddMimeType za svaki par dodataka / MIME tip
Za brojač = 0 do UBound(MimeTypesToAddArray) Korak 2
    AddMimeType MimeTypesToAddArray(brojač), MimeTypesToAddArray(brojač+1)
Sljedeći
 
'Stvori objekt Shell
Set WshShell = CreateObject("WScript.Shell")
 
'Zaustavite i pokrenite IIS uslugu
Set oExec = WshShell.Exec("net stop w3svc")
Da Dok oExec.Status = 0
    WScript.Spavaj 100
Petlja
 
Set oExec = WshShell.Exec("net start w3svc")
Da Dok oExec.Status = 0
    WScript.Spavaj 100
Petlja
 
Set oExec = Ništa
 
'Prijavi status korisnika
WScript.Eho "Microsoft Office 2007 Registrovani su tipovi MIME dokumenta."
 
'AddMimeType Sub
Sub AddMimeType (Vanjski, MType)
 
    'Nabavite mapiranja iz svojstva MimeMap.
    MimeMapArray = MimeMapObj.GetEx("MimeMap") 
 
    'Dodajte novo mapiranje.
    i = UBound(MimeMapArray) + 1
    Redim Sačuvaj MimeMapArray(i)
    Set MimeMapArray(i) = CreateObject("MimeMap")
    MimeMapArray(i).Produženje = Vanjski
    MimeMapArray(i).MimeType = MType
    MimeMapObj.PutEx ADS_PROPERTY_UPDATE, "MimeMap", MimeMapArray
    MimeMapObj.SetInfo
 
Kraj Sub

Apache MIME type addition (za administratora servera)

Apache stores its MIME types in a file normally located at $installpath/conf/mime.types. See the mod_mime documentation for more on how it works. Arch Linux installs its MIME types at /etc/httpd/conf/mime.types i Parallels Plesk installs it in /usr/local/psa/admin/conf/mime.types. Your distribution might have it in another place, so find your mime.types file by running locate mime.types.

Add the following lines to your mime.types file:

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

Apache MIME type addition (For the domain owner with at least FTP accessusing .htaccess file)

Add the following text to your domain’s .htaccess fajl, most commonly in an httpdocs/ directory

AddType application/vnd.ms-word.document.macroEnabled.12 docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.ms-word.template.macroEnabled.12 dotm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm
AddType application/vnd.openxmlformats-officedocument.presentationml.slide sldx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
udio
Wednesday, January 28th, 2009 | autor:

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.

udio