How can I prevent the other user from using the D drive

Solution 1:

  1. Right-click the file
  2. Properties
  3. Security
  4. Modify
  5. Add or remove user rights. If needed, remove anyone but you.

People will still be able to see D and E drives, but they won't be able to access them.

By the way, "Stop sharing" will only stop your computer from sharing these drives on the network, it does not have any effect locally.