Transfer of H1 B

Hi,

I am based in India. I have my H1-B petition approved from Company A. I do not want to join A.

  1. Can I have my visa stamped by Company A, then get my petition transferred to Company B and then again go for visa stamping for B while being in India itself? Is it a safe approach and recommended?

  2. Or should I get the visa stamped with A, travel to USA for A and then wait and shift to Company B with the transfer?

Regards

Abhay