why not use the installer, which sets it all up correctly for you?
In previous, I use installer. but I face more data corruption problem and also server starting problem when shutting down the system. so I try to install my self.
I think the problem is, you ran initdb as your user account, but the system service is running as the special system accounbt NETWORK_SERVICE, or similar, and there may be files in the data directory which the NETWORK_SERVICE account doesn't have write access writes to. you can probably fix this with the cacls command.
I think you are correct. But I want to know why database corrupted even though I shutting down the machine properly. This is frequently happen when I use installer also.