Make a note of your network settings, and which parts of your harddisk are 'shared' for access by the other PC.
You just unplug the network cable on the rear of your PC.
Then format/reinstall, put the network cable back in and run the network setup wizard or do it manually.