Reputation: 21
I currently have a Batch file that opens Power BI Desktop but as different User, but when I run this .bat file it prompts me to type in my password, is it possible to include the password with in the script so I do not have to type this in?
This is the current script I have within my .bat file
runas /user:[email protected] "C:\Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe"
Thanks
Upvotes: 1
Views: 7569
Reputation: 118
Another option would be this:
echo.[PASSWORD]>"%TEMP%\pass.txt"
runas /user:[email protected] "C:\Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe" < "%TEMP%\pass.txt"
del "%TEMP%\pass.txt"
(replacing [PASSWORD] with the actual password.)
Upvotes: 1