Run an exe/batch file from UWP app
Run an exe/batch file from UWP app from single package
Universal Windows Platform (UWP)
-
Roy Li - MSFT • 33,851 Reputation points • Microsoft Vendor
2022-06-22T08:22:25.607+00:00 Could you please tell me what you mean by "from UWP app from single package"? Do you mean that's not a normal UWP project?
-
samyraj r • 11 Reputation points
2022-06-22T09:41:37.4+00:00 Need run an cmd.exe from UWP application in single package
-
Roy Li - MSFT • 33,851 Reputation points • Microsoft Vendor
2022-06-22T09:48:16.09+00:00 @samyraj r Could you please explain what is a single package? Does it have some special meaning?
-
samyraj r • 11 Reputation points
2022-06-22T10:01:30.8+00:00 I want execute Launcher.exe from the UWP application.
-
samyraj r • 11 Reputation points
2022-06-22T10:16:38.557+00:00 <Package xmlns=http://schemas.microsoft.com/appx/manifest/foundation/windows10
….
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:rescap=http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities
IgnorableNamespaces="uap mp">
...<Applications>
<Application Id="App"..>
..
<Extensions>
<desktop:Extension Category="windows.fullTrustProcess" Executable="Assets\Launcher.exe" />
</Extensions>
</Application>
</Applications><Capabilities>
<Capability Name="internetClient" />
<rescap:Capability Name="runFullTrust"/>
</Capabilities>
</Package> -
Roy Li - MSFT • 33,851 Reputation points • Microsoft Vendor
2022-06-23T03:12:03.927+00:00 It looks like you've already found how to launch a exe from a UWP app.
-
samyraj r • 11 Reputation points
2022-06-23T05:08:10.617+00:00 above example not work for me.i try to to launch exe same uwp Package.appxmanifest.
-
samyraj r • 11 Reputation points
2022-06-23T05:11:12.257+00:00 it works only if have create separate application package project only. But my requirement is I want launch exe from uwp Package.appxmanifest file.
-
samyraj r • 11 Reputation points
2022-06-23T07:27:31.267+00:00 -
samyraj r • 11 Reputation points
2022-06-23T07:28:03.727+00:00 this msdn post. But it doesn't work for me.
-
Roy Li - MSFT • 33,851 Reputation points • Microsoft Vendor
2022-06-23T08:08:21.173+00:00 I don't understand what you mean by
it works only if have create separate application package project only. But my requirement is I want launch exe from uwp Package.appxmanifest file.
Do you mean that you don't have a exe file in your UWP app? Or in other words, you want to lauch any ,exe file from your UWP app? -
samyraj r • 11 Reputation points
2022-06-23T09:34:24.89+00:00 The exe file is in the UWP app assets folder.I want launch that exe file button click event.
-
Roy Li - MSFT • 33,851 Reputation points • Microsoft Vendor
2022-06-23T09:45:52.397+00:00 First of all, make sure that your exe file is correct. Please try to run the exe file which you placed in the Assets folder to check if it could run correctly.
-
samyraj r • 11 Reputation points
2022-06-24T05:07:24.96+00:00 exe file working properly.
-
Roy Li - MSFT • 33,851 Reputation points • Microsoft Vendor
2022-06-24T09:44:43.817+00:00 OK. Could you please tell me what you mean by
it doesn't work for me
? How do you launch the exe file? What's the code? And what is the behavior that you are getting? Did you get any errors or exceptions? -
samyraj r • 11 Reputation points
2022-06-27T03:50:07.42+00:00 I am not getting any error refer this MSDN post
https://learn.microsoft.com/en-us/answers/questions/311271/run-an-exebatch-file-from-uwp-app.html -
Roy Li - MSFT • 33,851 Reputation points • Microsoft Vendor
2022-06-27T09:33:45.16+00:00 So what's the code that you are using? Do you have any code snippets that you are using to share here? When you try to launch the app, it does not give any errors or exceptions, the exe file just does not show as it is supposed to, right?
Sign in to comment