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
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,940 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,420 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,461 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