Archive

Author Archive

Windows phone registration problems

February 23rd, 2012 No comments

I spent many hours to figure out why I cannot register my developer device HTC HD7 to the App Hub:

An error occurred registering your phone.  Please try again.

The help forum does not really help:

The phone registration service returned an unexpected ErrorCode value.
Try this:
Check App Hub site for service alerts and/or retry after a few hours.

I have discovered that when the phone is connected to Zune, the internet connection in the telephone is broken, although it has wifi connected. So I became suspicious and finally started Wireshark. And indeed, Wireshark has answer to all your network questions. Zune bypasses proxy settings of the Windows 7 system. My setting say, it should neither use proxy nor try to discover one. I do this on purpose, because the default company proxy is too restrictive (Facebook blocking). But hey, this is not a forbidden site:

CONNECT developerservices.windowsphone.com:443 HTTP/1.0
Host: developerservices.windowsphone.com:443
Content-Length: 0
Proxy-Connection: Keep-Alive
Pragma: no-cache

HTTP/1.1 407 Proxy Authentication Required (Access is denied)
Via: 1.1 GFI WebMonitor Proxy
Proxy-Authenticate: Kerberos
Proxy-Authenticate: Negotiate
Proxy-Authenticate: NTLM
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cache-Control: no-cache
Content-Type: text/html
Content-Length: 0

Of course, it bypasses settings, discovered a proxy but it is not able to authenticate – even though it offers NTLM!

In order to make any debugging even worse, it does some connections directly. So Zune will let you login to your account. It just uses different way how connect your phone to the internet – it will not let you even update the software if you are connected over proxy which requires authentication.

Registration of the company developer account has been a nightmare too, days of waiting. Support finally contacted us, but apparently things got fixed without their intervention.

Should I mention 10 steps of software update, which took 30 minutes, 3 automatic restarts and at the end told me it has more updates for me? How many of them were there waiting in the queue? Cancel.

Categories: Missing Answers Tags:

Disable password expiration in Windows 7 Home Premium

January 30th, 2012 1 comment

It looks like admin accounts in Windows 7 Home Premium have password expiration set on. However, Windows 7 in Home Premium edition does not have a GUI tool to remove it. There is, however, a command line tool which allows to do it over Windows Management Instrumentation – its name is wmic.

If you want to remove password expiration do the following:

  1. Click on Start button.
  2. Type wmic
  3. Right click listed program wmic and “Run as Administrator”
  4. Now you can list accounts that have password expiration set:
    path Win32_UserAccount where PasswordExpires=TRUE get Name
  5. And you can disable it – you will be prompted to confirm the change:
    path Win32_UserAccount where PasswordExpires=TRUE set PasswordExpires=FALSE

This is not really a missing answer, however, there are plenty of solutions which do not work well, or contain typos – mostly because of different quotes used in the command. This script allows changing the expiration at once for all users that have it set – and it does not contain any quotes ;-)

Anyway, this is so far the biggest failure I have encountered when using Windows 7 Home Premium edition: Force password expiration in home environment and do not provide a GUI how to disable it.

Categories: Missing Answers Tags:

Hasičský směnový kalendář

January 4th, 2012 No comments

Pro všechny hasiče, kteří používají Google potažmo Android tu máme perpetuální Hasičský směnový kalendář a to nejen pro rok 2012. Doufám, že to těm skvělým chlapíkům alespoň trošku pomůže.

Categories: Czech Tags:

Write into multiple ssh screens at once

September 15th, 2011 No comments

Sometimes I need to write commands to a handful of SSH sessions at once. I use putty terminal from Windows and did not find anything useful. So I let myself inspired by Rusty Klophaus’s pecho and wrote a Perl script, which is little bit more gentle to the escape sequences and than a small bash script which will nicely open multiple SSH sessions to given list of hosts. The nice think is that this works almost everywhere and does not need more than one standard Perl library on the writer side (on CentOS just run yum install perl-TermReadKey).

Categories: Missing Answers, Tools Tags:

Internal cryptographic library error when signing document

June 25th, 2011 No comments

Adobe Reader marked document signed with PDFCreator as invalid with this error message:

Error during signature verification.
Error encountered while validating:
Internal cryptographic library error.
Error Code: 0×2711

– Czech equivalent —
Chyba v průběhu ověřování podpisu.
Při ověřování se vyskytla chyba:
Interní chyba šifrovací knihovny.
Kód chyby: 0×2711

There is no info available on the internet what does it mean, so I contacted support and the answer was easy – I was signing the document with backup of my private key – there was no certificate present in that file, so there was not way how to calculate hash of the document. The solution is to export the private key including your certificate.

Categories: Missing Answers Tags:

How to use own vim configuration after sudo to shared account

June 17th, 2011 No comments

Recently I become a fan of vim – and after storing my tuned dotvim on github, I found out, that I miss my configuration when I sudo to the root account. However, I’m not the only sudo user and I we have our own dotvim configuration. Here is a simple solution to be put into root’s .bashrc:

if [ -n "${SUDO_USER}" -a -d "/home/${SUDO_USER}/.vim" ]; then
alias vim="/usr/bin/vim --cmd \"set runtimepath+=/home/${SUDO_USER}/.vim\" -u /home/${SUDO_USER}/.vimrc"
fi

It took me quite a lot of googling to find the right combintation of $VIMRC, $VIMRUNTIME, $VIMINIT, $VIMHOME – and finally as you can see, none of those variables is used. Very usefull during debugging was to run vim with -V. to see where it looks for its configuration. And yes, I have tried putting the code to set the runtimepath to the .vimrc, but it would have to be conditional and this seems more clean.

Categories: Missing Answers Tags:

How to change sar output time format to 24 (solution)

June 6th, 2011 No comments

I always forget how to change this and Google is not giving the right answer anywhere among top results, so here just for my record:
# Put into your .bashrc
export LC_TIME="POSIX"

# Or use just when needed
LC_TIME="POSIX" sar

sar is a command from systat package. It provides output in AM/PM format by default. Setting the locale LC_TIME to POSIX changes the time format to 24.

Categories: Missing Answers Tags:

Show Site IP of the currently loaded web page in Firefox

May 6th, 2011 No comments

I play quite often with /etc/hosts file (well I’m on window so I use C:\WINDOWS\system32\drivers\etc\hosts), or I even switch DNS to our development server using following Windows command (make sure your network connection is called LAN):
# Switch to development DNS
netsh interface ip set dns "LAN" static 192.168.10.10 primary
ipconfig /flushdns

# Switch back to DHCP
netsh interface ip set dns "LAN" source=dhcp
ipconfig /flushdns

All this is done to work with the real domain names already during development – no worry, we do some things by changing the top level domain to .dev, but I simply need both.

Now I need a tool which tells me quickly whether I’m in prod or dev. I was using ShowIP Firefox Extension , but it somehow behaved incorrectly for me – mainly looked like some caching problems.

So I decided to write my own extension which would be dead simple and would simply show me the current IP address of the domain loaded in the current tab. So I wrote it using Mozilla Add-on Builder. It took me less time than to write this post (ok, I have spent 2 years developing AllPeers and some months as Mozilla contractor on Firefox 3).

After installing the SiteIP Extension customize your toolbar and add the star icon (the default icon for extensions) to your toolbar.

Categories: Tools Tags:

Enabling Integration Features for IE Application Compatibility VPC Images on Windows 7

February 17th, 2011 No comments

We use Microsoft Internet Explorer Application Compatibility VPC Image to test compatibility with IE6, IE7 and IE8. Recently we have moved to Windows 7 and the last update of perpetually expiring images (created last time on January 18, 2011) raised some issues which made enabling of Integration Features quite difficult (BTW, the images have changed filenames, IE User does not have password stated in the IE_VPC_ReadMe.txt).

Missing drivers

When enabling the features, the installation requested usbhub.sys and usbd.sys. The first file was recommended by MS to be taken from the Windows XP SP3. I have downloaded the SP3 and extracted the file using 7zip:

7za x WindowsXP-KB936929-SP3-x86-ENU.exe i386\usb*.*

But the installation requested another file – usbd.sys, which is not part of the XP SP3 – so I have copied the file from my Windows 7 (C:\Windows\System32\drivers\usbd.sys).

Password prompt

With enabled integration features the VPC asks for password. As it turned out, it tries to do remote desktop connection to itself. It suggests Admin user but Password1 does not work – apparently the Admin account is missing completely. IE User does not work either, because this user does not have password and cannot make remote desktop connection to this PC. So the solution is to give IE User a password and to save the credentials during start up (you may need to delete credentials of the Admin user before using properties on the .VMC files.

This way I have solved all the problems I did not have when running the Compatibility images on Windows Vista with earlier images.

Categories: Missing Answers Tags:

Odstranění klávesnice Spojené státy – mezinárodní ve Windows 7

November 29th, 2010 2 comments

Přepínám mezi českou a anglickou klávesnicí, ve Windows 7 je ale super vychytávka při psaní s defaultní anglickou klávesnicí – Spojené státy (mezinárodní), kdy uvozovky a jiné podobné znaky slouží ke psaní znaků s diakritikou. Řešení je změnit klávesnici na Angličtina (Spojené státy). Nicméně to mi pouze přidá další rozložení pro psaní Anglickým jazykem. Mezi těmito rozloženími mě Windows přepínají natolik náhodně, že jsem to dodnes nepochopil.

Zatím jediný způsob jak se toho nadobro zbavit pro mě byl zásah v registrech – smazal jsem rozložení z registrů:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020409]
“Layout Text”=”United States-International”
“Layout Display Name”=”@%SystemRoot%\\system32\\input.dll,-5026″
“Layout File”=”KBDUSX.DLL”
“Layout Id”=”0001″

Categories: Czech, Missing Answers Tags: