I have a Xamarin project (Droid and UWP(Fall Creators)) and
I would like to start the UWP application by passing parameters.
I found how to start the application from command :
explorer.exe shell:AppsFolder\TestCommand_7ngdmc6chkqa8!App
Now I am looking to add parameters.
I found some examples for UWP but it doesnt work with Xamarin.
Has anyone ever tried and found a solution?
Thanks
The command line explorer.exe shell:AppsFolder\TestCommand_7ngdmc6chkqa8!App could not be used to launch UWP app with parameter. Windows Store apps aren't designed to run from the command line and there isn't a straightforward way to launch them from the command line. Although you can find some blogs about the above command line, but we could not recommend that.
Currently, It is a better way that launch UWP app with Windows.System.Launcher APi. But you need to register the protocol for your app at first.
After registered the protocol, you could also launch the App in the command prompt.
start [protocol name]:[parameter]
Example
start microsoft-edge:http://www.google.com
For more you could refer Launch an app for results.
Related
I've converted my app using Desktop App Converter.
Installed appx from step 1.
Launched cmd.exe and entered the following command:
"C:\Program Files\WindowsApps\MyApp_5.1.30.6486_x86__z4vxg0xscex6e\MyApp\myapp.exe"
Got the following error message: Access is denied.
Why?
What is the proper way to programmatically launch DAC converted app including any EXE inside of it?
Once installed, you can launch the app from the app list in the start menu.
If you need to be able to launch the app from a command box, you will need to declare an appExecutionAlias in the manifest, as described here:
https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-extensions#alias
I'm having some trouble integrating my app with the parse4cn1 lib. I followed the tutorial published on this link and the app registers normally on the Parse Server as an installation but when I try to send a push to Android devices they simply aren't being sent.
I haven't tried on iOS yet, since I figured I'd start with Android, and I'm working with a new GUI Builder app if maybe that affects something for any reason.
Thanks for your help.
Ok, I have found the problem, it was related to parse not the parse4cn1 lib. I'm actually new with parse and backend in general, I wasn't aware I had to run the pm2 restart command after modifying the cloud code.
It's working now, thanks!
Is there anyway to disable the TideSDK installer dialog popup when first opening your app. I am submitting an app to a 3rd party distribution site and it was rejected because of this.
Please help?
You could use tidebuilder.py and pass the -n parameter to it. The final command would be:
./tidebuilder.py -n -d {output dir} {source project dir}
If you create the application in bundled mode. There would not be any installer dialog popping up while installing the application. It is likely that you have created a networked installer and while installing and running first time its trying to fetch the modules from internet by popping up the installer dialog.
Can you provide some more details about your application, modules used by the same, are u creating net installer or bundled, which platform you are on ?
Also if possible describe the commands which you are using to create the application. This would be helpful for further investigating the issue.
i am working on sample applications using QT on Mac and i found out problem with one of its API. I want to run process so i am using following function
QProcess::startDetached();
And i am passing program(location of exe )and argument list as parameter now problem is that if the application is allready running then the this will create another process and runs it where as when i cross cheked with Windows its behavior is different in the sense that it does not start application which is allready running. can anyone help me how to fix the issue??
I think, it depends on the application properties. On window you can open multiple Doc files but cannot open Window Media player in two different (new) window.
So, First try opening a new application while its running. If its success, then it should work with QProcess .
To package an .air file into a native installer you have to use a batch program called adt.
The command on Windows will look something like this:
C:\Users\jisaacks>"C:\Program Files
(x86)\Adobe\Adobe Flash Builder
4\sdks\4.1.0\bin\adt" -package -target
native "D:\DEV\Flex4\Workspaces\AIR
Native Packager\AIRNIP\AIRNIP.exe"
"D:\DEV\Flex4\Workspaces\AIR Native
Packager\AIRNIP\AIRNIP.air"
I am trying to author a program in AIR that does this for you. Basically you drag/drop an .air file into it and it packages it into a native installer.
Well It gave me an Error #3219 error, which I looked up and found this:
AIR on Windows does not allow you to
run .bat files directly. Windows .bat
files are executed by the command
interpreter application (cmd.exe).
When you invoke a .bat file, this
command application can interpret
arguments passed to the command as
additional applications to launch. A
malicious injection of extra
characters in the argument string
could cause cmd.exe to execute a
harmful or insecure application. For
example, without proper data
validation, your AIR application may
call myBat.bat myArguments
c:/evil.exe. The command application
would launch the evil.exe application
in addition to running your batch
file.
If you call the start() method with a
.bat file, the NativeProcess object
throws an exception. The message
property of the Error object contains
the string "Error #3219: The
NativeProcess could not be started."
I am wondering if there is a possible work around or if I have hit a brick wall?
I believe you have hit a brick wall, at least with trying to do this in Adobe Air. Executing batch files can be a huge security hole, as your post claimed.
Are you trying to do this in Air for portability, or would you be able to use some other language?
I suggest trying to code this in python. Using the subprocesslibrary can help a lot.
http://docs.python.org/release/2.5.2/lib/module-subprocess.html
Serge Jespers (Adobe Evangelist) (http://www.webkitchen.be/) has done exactly this,
I think you should try to contact him for the details.
I helped him build a first solution by creating a windows executable which executed any bat file you specified, later he changed it by calling the java application (adt) directly which works fine as well.
He'll be very happy to help you.
UPDATE:
You can download the Package Assitant Pro right here: http://www.webkitchen.be/package-assistant-pro/