Register Windows Application for tel and callto protocols - windows

First of all let me say that we are pretty new with this "windows app" developing process.
Our customers want us to develop an app working as click to call. The app is working just fine, but we are encountering problems with that appearing in the "default apps for protocol" menus for callto and tel protocols.
We are kinda clueless about the steps needed to achieve this goal.
What we tried:
Adding the following to the manifests files.
<Applications>
<Application Id="App" StartPage="default.html">
<Extensions>
<Extension Category="windows.protocol">
<Protocol Name="alsdk" />
</Extension>
</Extensions>
</Application>
</Applications>
Modifying the registry keys:
[HKEY_CLASSES_ROOT\tel]
#="URL:custom_app"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\tel\shell]
[HKEY_CLASSES_ROOT\tel\shell\open]
[HKEY_CLASSES_ROOT\tel\shell\open\command]
#="<path_to_exe>.app.exe" "%1"
Any help WILL be appreciated. Thanks in advance.

Solved by registering the app first and then creating all the needed associations.
Windows Registry Editor Version 5.00
;Register The App
[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"CustomApp"="Software\\Clients\\CustomApp\\Capabilities"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\CustomApp]
#="CustomApp"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\CustomApp\Capabilities\StartMenu]
"CustomApp"="CustomApp"
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\CustomApp\Capabilities\UrlAssociations]
"callto"="CustomApp.callto"
"tel"="CustomApp.tel"
[HKEY_CLASSES_ROOT\CustomApp.callto]
#="CustomApp callto Handler"
[HKEY_CLASSES_ROOT\CustomApp.callto\shell\open\command]
#="\"<path_to_app>\\CustomApp.exe\" \"%1\""
[HKEY_CLASSES_ROOT\CustomApp.tel]
#="CustomApp tel Handler"
[HKEY_CLASSES_ROOT\CustomApp.tel\shell\open\command]
#="\"<path_to_app>\\CustomApp.exe\" \"%1\""
If you have any file associations, you can add them easily doing this:
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\CustomApp\Capabilities\FileAssociations]
".foo"="CustomApp.foo"
[HKEY_CLASSES_ROOT\CustomApp.foo]
#="CustomApp foo Handler"
[HKEY_CLASSES_ROOT\CustomApp.foo\shell\open\command]
#="\"<path_to_app>\\CustomApp.exe\" \"%1\""

Related

Why emulator not opening? (Xamarin)

https://i.stack.imgur.com/S2za3.jpg
Emulator(phone) won't open. What is the problem?
Output: Hardcoded string "Button", should use #string resource
when another emulator(phone) is installed it gives this error
https://i.stack.imgur.com/54dEY.jpg
Output: The package was not installed. Please check you do not have it installed under any other user. If the package does show up on the device, try manually uninstalling it then try again. You should be able to uninstall the app via the Settings app on the device.
NOW
I deleted the old app links. The second error is over. The first error persists. The emulator does not open on the phone.
Output: Hardcoded string "Button", should use #string resource
This is a warning not an error. This warning would not affect the app running. I was able to reproduce this when set the text like below.
<Button
android:id="#+id/button1"
android:text="Button"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
If you want to fix the warning, add a Strings.xml in you value folder of Resources. Strings.xml is a string table to help with localization of the application.
Add the codes below into Strings.xml:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<string name="Button_Text">Hello</string>
</resources>
And use it in your Layout:
android:text="#string/Button_Text"

MsiPackage conditional install: Don't uninstall if it detects package is already installed

I'm using Wix Bootstrapper and want to install a few applications through .msi packages alongside my main application. These applications may be installed in the target PC already so I need to detect these first and skip installation if they are already installed. Furthermore, during uninstallation, these applications should not be uninstalled since the Wix Bootstrapper did not install them.
I've tried to use the InstallCondition attribute but (as expected) it uninstalls if it detects the application is already installed.
My Bundle.wxs looks like this:
...
<Bundle>
<util:FileSearch Id='CheckApplicationX' Path='[ProgramFilesFolder]ApplicationX\ApplicationX.exe' Variable='ApplicationXFile' Result='exists' />
<Chain DisableRollback="yes">
...
<MsiPackage Id="InstallApplicationX" Vital="yes" Compressed="yes" DisplayInternalUI="no" EnableFeatureSelection="no" SourceFile="..\application-x.msi" Name="Application X" DisplayName="Application X" ForcePerMachine="yes" InstallCondition="NOT ApplicationXFile" />
...
</Chain>
</Bundle>
...
Any help/hints are appreciated!
You can try to detect if the applications are installed by looking in the Windows Registry and try to identify if there are "traces" left by those applications.
You can use the RegistrySearch tag to perform a conditional evaluation of the registry entries you're looking for and then deny the installation.
There's an example on Wix Website available at this link.
The following example shows how you can define if .NET 2.0 is installed on the target machine
<Property Id="NETFRAMEWORK20">
<RegistrySearch Id="NetFramework20"
Root="HKLM"
Key="Software\Microsoft\NET Framework Setup\NDP\v2.0.50727"
Name="Install"
Type="raw" />
</Property>
<Condition Message="This application requires .NET Framework 2.0. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK20]]>
</Condition>

Why is the ShortcutPanel not shown in izpack?

I am trying to make an installer with izpack 4.3.5. While installing, a shortcut should be added to the users Desktop. Though I have added the ShortcutPanel and did not add the skipOnNotSupported no panel is shown and no shortcut is created though it complies successfully.
I already took a look at the following post (izpack: create shortcut on windows) but couldn't figure out my mistake.
Here is part of my install-file:
<panels>
<panel classname="TargetPanel"/>
<panel classname="PacksPanel"/>
<panel classname="ShortcutPanel"/>
<panel classname="InstallPanel"/>
<panel classname="SimpleFinishPanel"/>
</panels>
<packs>
...
</packs>
<resources>
<res src="shortcut.xml" id="shortcut.xml"/>
</resources>
<natives>
<native type="izpack" name="ShellLink.dll"/>
<native type="izpack" name="ShellLink_x64.dll"/>
</natives>
And here is my shortcut XML:
<izpack:shortcuts version="5.0"
xmlns:izpack="http://izpack.org/schema/shortcuts"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://izpack.org/schema/shortcuts http://izpack.org/schema/5.0/izpack-shortcuts-5.0.xsd">
<shortcut
name = "test"
target = "$INSTALL_PATH\test.jar"
description="test"
programGroup="true"
desktop="yes"
applications="yes"
startMenu="yes"/>
<lateShortcutInstall />
</izpack:shortcuts>
Any ideas?
UPDATE:
I also tried to remove the lateShortcutInstall, but nothing changed.
Thanks in advance
You are trying to make install files for izPack version 5 work with izPack 4.3.5 (notice the version="5.0" in the shortcut XML?). This will not work as the format has changed in subtle details.
I suggest that you move to a current izPack 5 version (5.1.0 has just been released). It is actively maintained, more stable and better documented than 4.3.5.
If you are stuck on 4.3.5 please read my other post here: izpack-maven-plugin is not including native libraries by default and remove the <natives> element.

Can't install Windows 7 gadget

I'm developing a very simple gadget for Windows 7. I have created an index.html file and a gadget.xml file, compressed them as a zip, changed the extension to gadget.
When I double click on the .gadget file I get a window telling me if I'm sure I want to install the gadget as it comes from an untrusted publisher. I click 'Install', and everything seems to be fine.
However, the gadget is not installed.
I've looked at the Event Viewer and found nothing, it just silently fails.
Anyone knows what I might be doing wrong?
Here's the gadget.xml file:
<?xml version="1.0" encoding="utf-8" ?>
<gadget>
<name>Elecciones 2011</name>
<namespace>gnuine.com</namespace>
<version>1.0.0.0</version>
<author name="whatever">
<info url="hiddenforpublicpublish" />
</author>
<copyright>2011</copyright>
<description>Description</description>
<hosts>
<host name="sidebar">
<base type="HTML" apiVersion="1.0.0" src="index.html" />
<platform minPlatformVersion="1.0" />
<permissions>Full</permissions>
</host>
</hosts>
</gadget>
You need to create a .zip which has all the files directly in it.
What you probably have done is, put index.html and gadget.xml in a folder, zipped the folder.
What really needs to be done is, select index.html, gadget.xml and other files and folder and make a .zip out of it.
This was the issue I had faced, and doing this solved the problem.
Please check if that works.
Regards
download gadget
rename to rar extension from gadget extension
go to C:\Program Files\Windows Sidebar\Gadgets
extract all rename files with the same gadget file name like "new.gadget"
move the extracted folders to that directory. (to C:\Program Files\Windows Sidebar\Gadgets)
now you are done, problem solved.
I had issues with the version number, I thought it had to be:
x.x
not
x.x.x.x

Install a pfx certificate in a users store in Windows using WiX

Please, can someone provide me with a WiX snippet or solution for the mentioned scenario. I need to include the pfx file in the WiX msi and the user will download my msi to his machine via the internet explorer and Click install and I need also the certificate to be installed on his machine.
You need the Certificate element. It is part of the IIS extension for wix, but can be used for non-IIS related installations also.
You need to
declare a prefix for the iis namespace, for
example like this in the root Wix element:
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'
xmlns:iis='http://schemas.microsoft.com/wix/IIsExtension'>
Embed the PFX file as a binary
stream in your install package. Add
a Binary element under the
product element like this:
<Binary Id="MyCertificateBinaryStream"
SourceFile="c:/path/to/mycertificate.pfx" />
Declare a component with a <iis:Certificate> element, for
example like this. Look at the
documentation, you need to fill in some
more attributes. Note that you don't need CertficatePath if you use the BinaryKey attribute.
<Component Id="MyCertificateComponent" Guid="MY-GUID-HERE">
<iis:Certificate Id="MyCertificate"
BinaryKey="MyCertificateBinaryStream"
... some more attributes ...
/>
</Component>
Activate the IIS extension by adding
the option -ext WixIISExtension
option when invoking the wix command line tools. If you use visual studio, this is just a matter of adding a reference in your wix project to WixIISExtension.
To expand on the answer a little, the following set of attributes worked for me:
<iis:Certificate
Id="My.Certificate"
StoreName="root"
Overwrite="yes"
Name="My Friendly Certificate Name"
Request="no"
BinaryKey="MyCertificate.Binary"
StoreLocation="localMachine" />
Where the <Product> element contained a <Binary> child as follows:
<Binary
Id="MyCertificate.Binary"
SourceFile="$(var.ProjectDir)MyCertificate.pfx" />
(I included the PFX file within my WiX project).

Resources