I have Windows Vista and I'm planning to upgrade to Windows 7. Here my data is stored on two partitions, C:\ and D:\ . Most of my data is already in D:\ ; if I install Windows 7 can I install it on C:\ and have it not touch D:\ at all?
You can install Windows 7 on drive C and that does not affect drive D.
Furthermore, you can select the Upgrade option (if you upgrade from Windows Vista Home Premium to Windows 7 Home Premium etc.) and it does not touch your current data at all. But of course, you should back up your important data on drive C before the upgrade process.
The below chart shows the upgrade options: