by kraada » Mon Jan 26, 2009 10:31 am
Click Start, click Run, type in "cmd" and hit enter. This will bring up a command prompt. At the command prompt type "net user postgres /delete". This will delete the old postgres user. You can then reinstall PostgreSQL as normal.
If the above fails with a message "System Error 5. Access Denied", and you are in Windows XP, click Start --> Run. Type in C:\Windows\System32 and hit enter. Right click on cmd.exe and click "Run as Administrator". Then delete the postgres user per the directions in the first paragraph of this section.
If you are in Windows Vista and receive this error message, hit the windows key, type 'cmd' and then press ctrl+shift+enter and then enter the "net user postgres /delete" command. Once the user is deleted, you can then install PostgreSQL.