It will not work - or at least not that simple - if you place the qvw into different folders. For each environment you will have to create a new batch (or with advanced scripting trying to loop through various directories ...)
I think you need to store all the user credentials within an excel- or an inline-table and then you could loop over them and store each credential within a variable which are used to create the connections. I mean something like this:
load * inline [
for i = 0 to noofrows('Credentials') - 1
let vUser = peek('User', $(i), 'Credentials');
let vPW = peek('PW', $(i), 'Credentials');
let vConn = 'ODBC CONNECT TO PEGASYS (XUserId is $(vUser), XPassword is $(vPW));'
sleep 5000; // you might need to play with them to get a stable solution
This approach might be extended to an error-handling with the ERRORMODE feature and maybe creating a table within the loop to document which connections have been made and which of them were successful or not and why.
Also note that any working solution will stop funcitoning in a server environment. Why? Because the "reload" step is separated from the "display" step and an end-user has no control about which particular database is being accessed or what account will be used.
The only option there is to load all data for all users in your load script, and let the QVS decide on what to show to a particular user that opens the document. You can use Section Access and Data reduction to do that.