Search code examples
c#android-emulatorbluestacks

start bluestacks with Process.StartInfo.Arguments


I want start bluestacks with an app.I can run bluestacks but I can't run the application. how can i fix process Arguments

using (Process proc_blstck = new Process())
{
     proc_blstck.StartInfo.FileName = @"C:\Program Files\BlueStacks\HD-RunApp.exe";
     proc_blstck.StartInfo.Arguments = @"-json ""{\""app_icon_url\"":\""\"",\""app_name\"":\""Age of Z\"",\""app_url\"":\""\"",\""app_pkg\"":\""com.camelgames.aoz\";
     proc_blstck.Start();
 }

I expect run bluestacks then run aoz application in bluestacks. bluestacks working but aoz doesn't


Solution

  • I think you just did not terminate the leading "{" with a trailing "}"

    This very similar code works for me (Different app)

    proc_blstck.StartInfo.Arguments = @"-json ""{\""app_icon_url\"": \""\"",\""app_name\"":\""War and Magic\"", \""app_url\"": \""\"", \""app_pkg\"": \""com.stgl.global\""}";