# Winlogon - cannot set empty password from ruby

**URL:** <https://www.ruby-forum.com/t/winlogon-cannot-set-empty-password-from-ruby/119283>\
**Category:** Ruby\
**Created:** [November 5, 2007, 7:11pm UTC](https://www.ruby-forum.com/t/winlogon-cannot-set-empty-password-from-ruby/119283 "2007-11-05T19:11:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michal\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/779978/32.png) [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Post date:** [November 5, 2007, 7:11pm UTC](https://www.ruby-forum.com/t/winlogon-cannot-set-empty-password-from-ruby/119283/1 "2007-11-05T19:11:59Z")

</div>

Hello

I tried to make a ruby script that makes Windows XP automatically log  
on the local user “user” on startup. The purpose of the script is to  
find out the computer name and put it into the winlogon registry along  
with the username and password.

However, I cannot set the password to an empty string. It appears  
empty but when I restart Windows it says the logon failed, and there  
is a dot in the password field.

When I import the empty password using a registry file it looks the  
same but it works. I wonder if I do something wrong when writing the  
registry, there is also a parameter for length. The computer name is  
set correctly, though. Otherwise it won’t work even with the registry  
file.

I am using some older ruby one click installer (the version in the dll  
is 1.8.5.0 2006-08-25).

Attaching the hack for reference. I would appreciate ideas how to make  
it work with the script only.

Thanks

Michal
