How do you download app from app store from C# app? - c#

I am looking for a way to downloa an app store app to my PC from a C# program.
I need it to be done automatically and without leaving the program's context.
I have 2 ideas
1. using iTunes
2. implementing a component that uses the app store protocol for download
So...
How can I invoke iTunes and have download a specified app programaticaly?
Are there any documentation on App Store protocol?
Thanks,
Guy

Related

Trying to get Hard Drive Serial Number into a SQL Server via UWP app

I'm a relatively new Developer building my first app.
Right now I'm in the process of developing a UWP app and I am needing to get the Hard Drive Serial number from the PC from the Views (OnNavigatedTo), then after a few more fields are filled out, to then save all values to a SQL Server.
What I have discovered up to this point:
Grabbing some values like Hard Drive SN are not so easy with UWP.
I don't seem to have access to Registry HKLM via UWP
I can grab it very easily with PowerShell, and write it to a JSON or XML file. which I plan to do with a Service Account when PC is imaged.
I Don't know where to put the file where the App can see it.
Writing to Sql Server can only be done by creating a webservice and making HTTP / JSON calls via App. (I have this part setup but have not started accessing it via app yet)
So the part I really need help with I guess, is Where to Put JSON/XML file that App will be able to see and read from. Unless of course, someone knows of another way to get Hard Drive SN into a UWP app.
Thanks for Any Help
The recommended way to do this (if you want to go to the Windows Store) is to use a FileOpenPicker and have the user choose the file manually.
If this is for side-loading only (not going to the Windows Store) you can write the file to the user's Documents folder and then the UWP can read it using documentsLibrary capability without any user intervention. You could also use a fullTrust extension to run the PowerShell script and to put the file in the app's data folder. You can check out the Desktop Bridge docs for more info on fullTrust extensions.

User Specific DLL for UWP

I am looking for a way to update a UWP Library for a specific user, the app is hooked into a server that I could easily send the new .dll file down with, can I just replace the file in the install folder like I could in WPF or a windows service? Or could I have a second app that could do this when the original app isn't running?
I really dont think this is possible because UWP apps run in a sandbox. You could not create a second app to update the first because it would not be able to access the files of the first app.

Invoking desktop app from Windows Store app

I have a Windows form desktop application developed using c#. I want to make use of the live tile feature available in WinRT apps (especially for Windows 10). The data in the live tile is to be fetched using WMI queries (Win32_LogicalDisk).
How do I accomplish this? I don't want to rewrite the entire app. Live tiles should update on the background and on clicking the tile, my desktop app exe needs to be invoked. Is it possible to fetch WMI data and invoke exe from Windows Store apps?
I tried using Brokered Windows Runtime components as given in http://blogs.msdn.com/b/dmx/archive/2014/04/30/how-to-trigger-a-desktop-process-from-windows-store-apps-the-easy-way-using-the-brand-new-visual-studio-templates.aspx . But could not get it to work as I get a 'TypeLoadException'.
Thanks in advance.
Metro app can't run a desktop app. However, they can commumicate using wcf. So, you can create tiny windows service that will open wcf host. Then you create windows store app with your live tile(s). When windows service recieves a wcf call, it starts the desktop application.
There is also devexpress' solution that is capable of adding live tiles for desktop apps, however it is not free: https://www.devexpress.com/Products/NET/Controls/WinForms/Live-Tile-Manager/
WinRT blocks network loopback so wcf won't work. You can disable this for testing but I suspect that won't satisfy you. Read more here (and search for WinRT network loopback to find articles on this topic).
https://msdn.microsoft.com/en-us/library/windows/apps/Hh780593.aspx

Is there a possibility to start another App or Program from a Windows 8 Store App (C#)

I want to start another App or Program from my Windows Store App. For example my App is showing emails, so if someone clicks on such an email Outlook should open. Is this possible in an "App-Sandbox"?
It is not possible to just launch an arbitrary application, but with custom protocol activation you can launch an app that handles that protocol and if it is not installed - the OS will ask the user to install it. It means that if you can define a custom protocol in your app - you can launch it from another app with this protocol assuming no other app registers to handle it. An example of that is any XBOX Live app - if you check their manifest files - they all handle custom protocols.
If your specific question is about launching a specific app by name or location then no, this is not possible, but if you know a protocol handled by the app you want to launch - you can try using that - just bear in mind that there might be other apps that handle that protocol.
Short answer: no, it's not possible.
You can open files with their associated application but not spawn any arbitrary external process.
As #mitch-wheat pointed out, that's why it's called a sandbox.
Check out this sample
The sample is for Windows 8.1 but I think will work for Windows 8 as well.

how can an create a dotnet desktop application to access SMS.db on IPhone without Jailbreak?

i want to create a desktop application using c#, by which i can access the iphone device and able to read SMS.db to read the SMSs
It's possible to read the iPhone's filesystem over USB via the MobileDevice Library (not that this will be easy). There's even a .NET wrapper library for doing so.
Not possible I'm afraid unless you jailbreak and tunnel into the iPhone.
Don't forget to change the default password!

Categories