That depends on what you are actually trying to do.
First, hard-coding a password in a text file is never a good idea. It certainly should not be in the original trigger.bat.
One option is to create a bat file something like this and have the user enter some information.
CallTrigger.bat
trigger.bat https://SERVERNAME:9300/p2pd/servlet/dispatch %2 %3 namespace %1
So they would use...
CallTrigger.bat trigger username password
...at the command line.
Or you can write a desktop or web app in your language of choice to have them fill in textboxes (one of them probably masked as a password), then make the call.
If you are trying to do something else, like trigger Cognos reports by using a GMSA...
trigger.bat is an SDK program. The source code is available in the Cognos install. You can create your own version.