Hello!
Dear all, please, where can I find the source code of the pipeline 'bat' command?
I would like to make my own function, that would run the bat command as a user ('batas').
I suppose, that there would be some java call to Windows CreateProcess, that can be simply made to call CreateProcessAsUser with every other functionality of pipeline bat remaining the same.
- Why not to run Jenkins service as another user? I dont want to tun the whole script as another user, I need to switch users dynamically .
- Why? Windows SUBST for drives can be altered only locally for a user and I want it to be altered ONLY for one build job to prevent conflicts. (So I will create temporary workspace users for that ("net user ..."))
- Why not to use pstools or powershell? ... That is my current approach, but in the end I love the functionality of pipeline bat (pstools for example cannot process longer arguments than 256 characters) and I suppose that it sould be easily altered...
Thank You very much guys!
Martin