Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8821803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:56:38+00:00 2026-06-14T05:56:38+00:00

For Windows Store applications, a developer licence is required to run the unit tests,

  • 0

For Windows Store applications, a developer licence is required to run the unit tests, which is fine for the individual developer on his personal machine.

But for a continuous integration process on a build server, we really need the ability to acquire the licence automatically.

Microsoft provides a command line tool, but it still creates a interactive window, which breaks the process.

TailoredDeploy.exe AcquireDeveloperLicense

So does anyone know of any other way to automatically acquire a developer licence? Spawning new build nodes is going to be hell if it needs manual setup via. VPN for each of them.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:56:39+00:00Added an answer on June 14, 2026 at 5:56 am

    I was suggested to use UI Automation, and here’s what I’ve conjured up so far:

    using System.Diagnostics;
    using System.Threading;
    using System.Windows.Automation;
    
    class Program
    {
        static void Main(string[] args)
        {
            var processStartInfo = new ProcessStartInfo(@"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\TailoredDeploy.exe", "AcquireDeveloperLicense");
    
            var process = Process.Start(processStartInfo);
            process.WaitForInputIdle();
    
            Thread.Sleep(1000);
    
            var agreementWindow = AutomationElement.RootElement.FindFirst(TreeScope.Children,
                new PropertyCondition(AutomationElement.ProcessIdProperty, process.Id));
    
            var iAgreeButton = agreementWindow.FindAll(TreeScope.Children, Condition.TrueCondition)[0]
                                              .FindAll(TreeScope.Children, Condition.TrueCondition)[2];
    
            var buttonPattern = iAgreeButton.GetCurrentPattern(AutomationPattern.LookupById(InvokePattern.Pattern.Id)) as InvokePattern;
            buttonPattern.Invoke();
    
            Thread.Sleep(10000);
    
            var processes = Process.GetProcessesByName("dllhost");
    
            var credentialsWindows = AutomationElement.RootElement.FindAll(TreeScope.Children,
                new PropertyCondition(AutomationElement.ProcessIdProperty, processes[0].Id));
    
            if (credentialsWindows[0].Current.Name == "Developer License")
            {
                var credentialsPane = credentialsWindows[0].FindAll(TreeScope.Children, Condition.TrueCondition)[0]
                                                           .FindAll(TreeScope.Children, Condition.TrueCondition)[0]
                                                           .FindAll(TreeScope.Children, Condition.TrueCondition)[0]
                                                           .FindAll(TreeScope.Children, Condition.TrueCondition)[0]
                                                           .FindAll(TreeScope.Children, Condition.TrueCondition);
    
                var usernameTextBox = credentialsPane[3].GetCurrentPattern(AutomationPattern.LookupById(ValuePattern.Pattern.Id)) as ValuePattern;
                usernameTextBox.SetValue("username@outlook.com");
    
                var passwordTextBox = credentialsPane[5].GetCurrentPattern(AutomationPattern.LookupById(ValuePattern.Pattern.Id)) as ValuePattern;
                passwordTextBox.SetValue("password");
    
                var loginButton = credentialsPane[8].GetCurrentPattern(AutomationPattern.LookupById(InvokePattern.Pattern.Id)) as InvokePattern;
                loginButton.Invoke();
    
                Thread.Sleep(10000);
    
                var finishUpProcesses = Process.GetProcessesByName("TailoredDeploy");
    
                var finishWindow = AutomationElement.RootElement.FindFirst(TreeScope.Children,
                    new PropertyCondition(AutomationElement.ProcessIdProperty, finishUpProcesses[0].Id));
    
                var lastItems = finishWindow.FindAll(TreeScope.Children, Condition.TrueCondition)[0]
                                            .FindAll(TreeScope.Children, Condition.TrueCondition);
    
                var closeButton = lastItems[3].GetCurrentPattern(AutomationPattern.LookupById(InvokePattern.Pattern.Id)) as InvokePattern;
                closeButton.Invoke();
            }
        }
    }
    

    To use this, a app.manifest is required to run in elevated mode:

    <?xml version="1.0" encoding="utf-8"?>
    <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
      <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
          <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
            <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
          </requestedPrivileges>
        </security>
      </trustInfo>
      <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
        <application>
        </application>
      </compatibility>
    </asmv1:assembly>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Pardon my ignorance, but I've never really developed Windows applications. How do you store
I am creating a windows phone application, which need to store some data in
I am trying to port my Windows 8 Store application from Developer Preview to
I am writing a Windows Store App toy application for Windows 8. It has
Is there something like SESSION in Windows application? I want to store a few
I am writing Windows application (with Borland C++ Builder), which stores large number of
Using java If I store windows paths in a h2 database, and then try
Does Windows XP (and up) store how long it has been... ...since the system
I have developed a Windows application in .NET which uses a SQL Server database
Is there a way I can make a Windows Store App style tile for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.