msbuild on batch file

alice 21 Reputation points
2022-04-07T04:35:44.457+00:00

Here is the command

devenv gperftools.sln /upgrade

I command it on command prompt 2019 and it success.
I command it on batch file and run the batch file on command prompt 2019. It doesnt work.

How to let the it work?
https://github.com/gperftools/gperftools/blob/master/README_windows.txt

Windows for business | Windows Server | User experience | Other
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,926 Reputation points
    2022-04-14T07:04:55.64+00:00

    Hi Alice-7236,

    You need to run the batch file with administrator rights.

    Follow the steps mentioned below.

    1. Right-click on your batch file.
    2. Click Create Shortcut
    3. Right-click on the shortcut files and click on Properties.
    4. In the Shortcuts tab, click on Advanced.
    5. Check the ‘Run as Administrator’ checkbox.
    6. Click OK to close the dialogue box.
    7. Click on Apply to save the changes. Click Ok to close Properties.

    Now, every time you run the shortcut file by double-clicking it, the Windows UAC message will be displayed. Click Ok to run as administrator in Windows. This is required as commands would need access to more system-level components that are not available when you open CMD in user mode.

    I hope this answers your question.

    Thanks.

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.