Mittwoch, 30. Dezember 2009

.msi error codes and commandline switches

Lock Desktop shortcut

How to create a shortcut to lock the desktop:

  1. Right click on the desktop
  2. Select New, Shortcut
  3. Enter "rundll32.exe user32.dll, LockWorkStation"
  4. Add a shortcut name
  5. Finish

Windows Autologon

Sometimes it is helpful to have a Windows machine perform an automatic login upon start-up. How to enable this is different for Windows XP and Windows Vista.

(I know there are other ways to do this, but that's the way i do it...)

Windows XP:

  • The account you want to auto login must have a password set.
  • Edit the registry keys below in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
  • DefaultUserName (REG_SZ)
  • DefaultPassword (REG_SZ)
  • AutoAdminLogon (REG_SZ) 1=autologon aktive, 0=disabled

Windows Vista:

  • Click on the Start button and type in ‘netplwiz‘. This will open the Advanced User Accounts menu
  • In the 'Users' tab, highlight the account you want to login to Vista automatically, and then untick ‘must enter a username and password to use this computer’
  • Click on ‘Apply’. A new window will now popup asking you to enter the password of the account you’ve just highlighted.
  • Do this, and then click ‘Ok’
  • Click ‘Ok’ on the Advanced User Accounts menu to finish

Keilschrift, Kompass, Kaugummi

"Eine Enzyklopädie der frühen Erfindungen"
Peter James und Nick Thorpe
ISBN 3-423-62084-6

    

Ein geniales Buch für Leute welche sich geschichtlich wie auch technisch interessieren. Vieles wurde schon Jahrhunderte vor unserer Zeit erfunden, geriet vergessen und wurde schliesslich neu entdeckt oder gar nochmals erfunden.




Freitag, 18. Dezember 2009

Energiesparlinks Schweiz

Einige Links zum Thema Energiesparen aus dem selben Artikel:

Energiesparlampen

Bin gerade über einen Artikel über Energiesparlampen gestolpert.

Was ich beim Kauf nie weiss sind die "Farbtemperaturzahlen":

  • 827 = warm weiss (normal)
  • 840 = neutral weiss
  • 865 = Tageslicht

D.h. je höher, desto weisser.

Hell oder blendfrei?
Die Stablampen sind sehr hell können aber daher auch blenden. Andere Lampen in z.B. Tropf oder Kerzenform sind beschichtet und blenden weniger, sind aber auch ein klein wenig weniger effizient.

Schaltfestigkeit?
Standardlampen (Lebensdauer 6-8'000h) sollten nicht ständig ein- und ausgeschaltet werden (Bewegungsmelder), sie sollten ca. 1h brennen.
Es gibt speziell schaltfeste Lampen   

Preis?
Energiesparlampen sollen cas 80% günstiger sein (Strom- und Anschaffungspreis)

Freitag, 6. November 2009

Sarah2 - Das Geheimnis der Einhornfohlen


Sein einiger Zeit spielen meine Kinder (und ich) begeistert dieses Fantasy Adventure von www.tivola.de.

Weil wir uns im Zauberwald immer verirrten haben wir eine Karte erstellt. Diese ist hier zu finden, möge sie auch Anderen hilfreich sein.

Dienstag, 20. Oktober 2009

Read password from script

For a script that connects to several shares, I wanted to be able to prompt the user to enter the password. Of course, when entering the password its characters should not be printed on the screen, instead a '*' should appear.

I did not find an easy, ready available way to achieve this, so i created my own solution for this: A simple (.NET) console application reads the password in the manner i wanted and creates a .cmd script that, when called sets a script variable. This script variable can then be used. Of course the script must be deleted and the variabale reset after usage.

I know that this is not 100% secure, but its enough for my usage.

The .exe, a sampe script, and the .NET solution can be found here.

Mittwoch, 14. Oktober 2009

Can not access share on removeable media

On my server (WinXP) I have several folders shared to allow access from clients. On the clients I connect to these shares with "net use f: \\server\share".

Generall this works fine, except the one share on the server that is on a removeable drive (USB HDD). Always when I try to connect I get:

"System error 1130: Not enough server storage is available to process this command"

After some research I discovered that I need to add the following registry key on my server:
Path: "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters"
Key: "IRPStackSize"
Type: DWord
Value: 18 (that worked for me, maybe you need to set it even higher)

Since I've done this, I have no problem accessing the share on the removeable drive anymore.

 

Dienstag, 13. Oktober 2009

Excel ignores milliseconds

I often need to calculate in Excel time durations between two timestamps from log files that have the form like 14:23:45.342.
Now when entering such timestamps strings into Excel cells, they are not recognized as time, and calculating differences does give an error. When I use timestamps in the form like 14:23:45, ie. without the millisecond part, it works fine.
I use the custom time format "hh:mm:ss.000", but this seems not to work when there are milliseconds present.
While this bothered me for month now, i coincidentally stumbled over the solution: It seems that this behavior is caused by my regional settings, more exactly by the date separator that is set to '.'. As soon as i change this to something else it works.
My solution if i need to do time calculations with Excel: Before starting Excel, change the date separator in  Control Panel -> Regional and Language Options -> Customize -> Date to something else than '.'
If you know another solution, without the need to change the date separator, please fell free to leave a comment.

Update [April 2013]:
In the meantime W7/8 and Office 2010 is widley used and the above mentioned solution does not worky anymore (apart from being cumbersome to use) as the Date Separator is not easily available anymore.
But, I found another workaround:

I often import .csv files into excel. The timestamp in the files look like:
...;2013.03.13;12:24:59.378;Info...

Opening such a file in Excel shows:

  • The date has been correctly imported as "date" type (its right aligned)
  • The time has been imported as text (its left aligned)
Now create a new column and use the formula below to parse the time-text into a time value:
= A1 + TIME(MID(B1;1;2);MID(B1;4;2);MID(B1;7;2)) + VALUE(MID(B1;10;3))/(86400*1000)
Where:
  • A1 = cell containing the date
  • B1 = cell containing the time textCopy this formula to all new cells and format the new cells as time with milliseconds (eg: "TT. MMM JJ hh:mm:ss.000")
  • The new column is now a time type (its right aligned). It can be used for example to calculate time difference or to produce a scatter plot.

Samstag, 25. April 2009

My first post

I have just created this blog and will now add posts