2

I'm developing a tool which will automatically install a software in PC. I'm trying to do this with Coded UI in visual studio 2013.
To install the software I need to click on the "Next" button on setup window. But when I click on the button its showing a warning -

Access to the application is denied

Here is the screenshot of the issue -

enter image description here

How can i automate the process?
Is there any better approach rather than Coded UI that I should think about to install the software automatically?

Ali Akber
  • 3,670
  • 3
  • 26
  • 40
  • Typically you would use [msiexec](http://stackoverflow.com/a/181434/33499) to automatically install software. – wimh Nov 14 '15 at 16:52
  • @Wimmel Yes. I know this. But some software like .NET Framework 4.5.1 can't be installed that way :( That's why i'm using this approach. Hope you understand :) – Ali Akber Nov 14 '15 at 17:03

2 Answers2

1

Just run Visual Studio 2013 in Administrator mode.
See this thread to get more clear idea.

Ali Akber
  • 3,670
  • 3
  • 26
  • 40
0

You can try using Win32 API methods inside the generated test method to get the window handle for the next button control and see if either 'send message' or 'post message' (win32 api methods) can be manually added to achieve the required click action. For more details about win32 api methods usage and commonly used methods please refer the below links:

https://msdn.microsoft.com/en-us/library/windows/desktop/ff468919(v=vs.85).aspx

http://www.c-sharpcorner.com/UploadFile/SamTomato/clicking-a-button-in-another-application/

5Qe
  • 44
  • 4