We know that there's a difference in meaning between try used with the infinitive and try used with the gerund:
I tried sending her flowers. (Meaning: An experiment: I sent her flowers to see what will happen).
I tried to send her flowers. (Meaning: I tried to go through the procedure necessary to send flowers to her. The procedure might have been difficult.)
(per Michael Swan's PEU, Unit 299.6)
Will the same distinction hold if we use trying:
A man is trying setting up a password on his computer. (Is he experimenting, wanting to see what will happen?)
A man is trying to set up a password on his computer. (Is he trying to go through all the necessary steps, probably difficult, of setting up a password?)