You should specify which camera, and which PC photo software. Then maybe someone using the same can offer suggestions.
Mine (D300 and D800 cameras, and Photoshop) always come out correctly oriented automatically. Also my wifes little compact camera comes out correct automatically. There is a flag in the file that tells which way the camera was oriented, which the photo editor should honor. I think yours should be automatic too, and cannot offer any reason why it is not.
There is also a camera Display Setting of Rotate Tall, which affects how it is rotated on the rear LCD. Rotate Tall never seems any advantage, and it does not affect how the PC software shows it.