Make our application show in access and defaults - windows

We are developing our application to be a default e-mail program, and would like it to be one of the options in the Control Panel-> Add or Remove Programs-> Access and Defaults-> Custom-> Choose a default e-mail program: area. How is this done?
It's a rather simple registry change to add the application to the list in IExplore-> Tools -> Internet Options -> Programs -> E-mail: But apparently this is not the list that is displayed in the Access and Defaults area.

Here's the msdn page for Registering Programs with Client Types, which is what you need to do. It's a few registry keys, and there is even a sample for a mail client.

Related

Enable SSO login in Oracle APEX

Need help enabling SSO login in Oracle APEX application, my company supports SAML 2.0, they are asking me what nameid will be used. I don't know if SSO is an option in APEX or not? Any help is appreciated guys. Thanks.
This article should give you some guidance:
https://insum.ca/saml2-single-sign-on-with-oracle-application-express/
TL;DR
Use Apache HTTPD as a web proxy for APEX.
Install and configure the mod_auth_mellon module for the web server.
Set up the application on the identity management system of choice.
For the APEX application, use the HTTP Header Authentication Scheme. The HTTP Header variable should have been configured when mod_auth_mellon was installed and set up.
HTH.
I don't know SAML, but - as far as SSO in Apex is concerned, here's how to do that. See if it helps.
Suppose that there's an application which is used as a "menu" that lets you navigate through different Apex applications. In that menu application, go to
Shared Components
> Authentication Schemes
> choose Current scheme (e.g. "My menu auth. Scheme")
> Session Cookie Attributes > type MY_MENU_COOKIE into „Cookie name“ field
If application menu is the list item, its query might look like this: it selects all applications available to user logged in as :APP_USER (those user:application pairs are stored in the oper_x_app table). Pay attention to &SESSION. - without it, it won't work:
select
null,
app_name labelValue,
'http://szg01lcp1.data.centar:8084/apex/f?p=' || id_app ||':1:&SESSION.' targetValue,
null is_current -- ^^^^^^^^^
from applications -- This!
where id_app in (select id_app from oper_x_app
where username = :APP_USER
)
order by app_name
Now, for all those applications, you have to do the same: navigate to
Shared Components
> Authentication Schemes
> choose Current scheme (e.g. "Copy of My menu auth. Scheme")
> Session Cookie Attributes
> type MY_MENU_COOKIE into „Cookie name“ field
Go to that application's
Navigation menu
> Create list entry
- name the entry "My apex menu"
- target type URL should look like this; &SESSION. is again important!
http://your_server:8084/apex/f?p=118:1:&SESSION.
^^^^^^^^^
This!
That's all; using the "My apex menu" navigation menu entry, you can go to the central place of your applications and switch among them without having to log on all over again.

Titanium: Open Privacy -> Location Services programmatically

the following code is able to successfully launch my App's settings programmatically (iOS 8) in Titanium:
var settingsURL = Ti.App.iOS.applicationOpenSettingsURL;
if (Ti.Platform.canOpenURL(settingsURL)) {
Ti.Platform.openURL(settingsURL);
}
The problem is that if a user has turned off their Location Services inside the Privacy page he/she won't be allowed to change this inside the App's settings, requiring the user to go back into Settings -> Privacy -> Location Services. This is very bad for the user experience-wise.
I know it is possible to launch the Privacy -> Location Services directly, since many apps do, like: Hotel Tonight, Foursquare, Dojo, etc.
How to do this in Titanium?
My configs: SDK 3.5.1GA & iOS8.
No, there is no API available.
In iOS 8 you can open setting but not Location setting directly
there was some url schemes to open setting functionality, example
Ti.Platform.openURL('prefs:root=LOCATION_SERVICES');
but apple removed this from iOS 5.1. So it will not work on 5.1 and greater.
For this to work you need to try to create a listener to Titanium.Geolocation, something like:
Titanium.Geolocation.addEventListener('location', locationCallback);
Keep in mind you need to do this even without checking that you have permission, this way iOS will prompt you to turn on location services using an alert dialog and thus you can be redirected directly to Privacy->Location Services.

URI scheme launching

I've been given a task to create a protocol similar to callto:, that - upon clicking on a link with it - would automatically launch an installed aplication.
I followed the microsoft guide on how a scheme should look like.
My scheme looks like this:
HKEY_CLASSES_ROOT
slican
URL Protocol = ""
DefaultIcon (Default) = "C:\Users\Okabe\Desktop\slican\SlicanP.exe,1"
shell
open
command (Default) = "C:\Users\Okabe\Desktop\slican\SlicanP.exe" "%1""
I thought that was all and tested it with
test link
test telephone link
There was no reaction whatsoever. Internet Explorer asked me if I want to search for a program that can open the content and Chrome responded with nothing, as if I clicked javascript:void(0).
How to get that worked?
Thank you for your help!
The registration you show works perfectly fine for me when I try it on Windows 7. The local app I registered in place of SlicanP.exe ran fine when I invoked a slican: URL from the Start | Run menu, and from within the address bar of Windows Explorer. So the registration works.
Do be aware that Internet Explorer runs in a lower integrity security context, so it may not have rights to run local programs. When I tried to click on an HTML link to a slican: URL, or type a slican: URL in the address bar, IE had trouble executing the local app (even after prompting for permission). I had to run IE as an administrator, then the local app ran just fine.
Also, you really should not be creating a HKEY_CLASSES_ROOT\slican key directly. Create a HKEY_CURRENT_USER\Software\Classes\slican (current user only) or HKEY_LOCAL_MACHINE\Software\Classes\slican (all users) instead. Refer to MSDN for more details:
HKEY_CLASSES_ROOT Key
Merged View of HKEY_CLASSES_ROOT
Update: Since it works in Windows 7, Microsoft probably changed how URL schemes are registered in Windows 8. For instance, phone/store apps use URI activation:
URI activation (XAML).
URI activation (HTML)
The documentation says there are two ways to register a custom URI scheme:
Internet Explorer uses two mechanisms for registering new pluggable protocol handlers. The first method is to register a URI scheme name and its associated application so that all attempts to navigate to a URI using that scheme launch the application (for example, registering applications to handle mailto: or news: URIs). The second method uses the Asynchronous Pluggable Protocols API, which allows you to define new protocols by mapping the URI scheme to a class.
You are doing the first. Try using the second instead.
However, I just noticed that "Asynchronous Pluggable Protocols" is listed on MSDN in the "Legacy APIs" section, and it has the following note:
Third-party protocol implementations won't load in Windows Store apps using JavaScript, or in the Internet Explorer in the new Windows UI.
So it may or may not work in Windows 8.
Update: I just found this:
Guidelines for file types and URIs
In Windows 8, the relationship between apps and the file types they support differs from previous versions of Windows.
Walkthrough: using Windows 8 Custom Protocol Activation
The file type and protocol association model has changed in Windows 8. Apps are no longer able to programmatically set themselves as the default handler for a file type or protocol. Instead, now the user always controls what the default handler is for a file type or protocol.
Your app can use existing protocols for communication, such as mailto, or create a custom protocol. The protocol activation extension enables you to define a custom protocol or register to handle an existing protocol.
Also have a look at this:
Setting mailto: protocol handler programmatically in Windows 8
And this:
Default Programs
if you go to C:\Users\\AppData\Local\Google\Chrome\User Data
You can edit the Local State file
Search for protocol_handler
The syntax here is a key value pair. I usually copy two mailto: and make sure that you set your protocols to false. This will mean that chrome will treat your new protocols as URI_Handler events
If you have troubles with configuring custom URI scheme, you can compare your own configuration with existing one. For example, "HKEY_CLASSES_ROOT/mailto" - most likely you have it already in your system.

AppleScript application can't get rights in Accessibility

I'm having trouble with my own AppleScript applications and Accessibility in "Security & Privacy".
I've written an application called "open cubase" that I've granted accessibility rights. I used Apple's advice on how to prevent repeated re-authorization (http://support.apple.com/kb/HT5914). But now even when the application is listed and selected in the Accessibility list, it says that it doesn't have assistive access.
And when I'm using
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/Tcc.db 'SELECT * FROM access WHERE client LIKE "%%"'
to check what's going on, I can see this:
kTCCServiceAccessibility|com.atonus.open-cubase|0|1|0|??
Why is there ?? at the end of that? Is there anyone who would know how to resolve this?
I'm using OSX 10.9.2.
Update, based on feedback from the OP:
The OP's issue is not the use of property statements that normally cause an AppleScript-based application to self-modify the application bundle's embedded Contents/Resources/Scripts/main.scpt script file when property values change at runtime.
However, Apple's workaround at http://support.apple.com/kb/HT5914
IS specifically meant to address not requiring re-authorization as a result of this self-modification issue for a given version of an application.
is NOT meant to allow updating the app (changing its source code or resources) without re-authorization.
For security reasons there is NO way to grant one-time authorization to an app based on its bundle ID and then keep it authorized no matter how it changes (e.g., through updates).
You have two options:
Either: Re-authorize the application every time you update it.
After updating your app, go to System Preferences > Security & Privacy > Privacy > Accessibility and toggle the checkmark next to the list item representing your application (if you application isn't there, drag it there).
Note: With Apple's workaround in place - which for security reasons is NOT a good idea unless you truly need to use property statements that persist their values - it may be sufficient to re-sign the application - haven't verified that.
Or: Use a workaround - not recommended for security reasons:
Make your app an unchanging wrapper that loads the true script code at runtime from a location OUTSIDE the app bundle - that way, the app stays the same and doesn't require re-authorization even if the script file loaded at runtime changes.
Example: Say your true script code - involving code requiring assistive access - is stored as ~/Desktop.test.scpt; your wrapper application, once authorized, can then invoke that script with run script file ((path to home folder as text) & "Desktop:test.scpt")
I don't have a specific explanation, but a recommendation:
Do not use properties (e.g., property FNAME : "Input.txt") in your AppleScript-based applications: AppleScript persists these automatically (preserves their values between runs), but the feature is implemented awkwardly (the persisted values are written to the *.scpt file itself - this is what causes the repeated authorization problem) and flimsily (if you modify your application and save (the *.scpt file at the heart of the) application again, previously persistent values are lost).
If you stay away from properties, the problem with repeated authorization simply goes away (unless you update your application). You can roll your own persistence, e.g., via AppleScript's support for .plist (property-list) files (see the System Events dictionary).
You also won't need the workaround described in the linked support article (http://support.apple.com/kb/HT5914), which is also a plus, given that the workaround is based on opening up a security hole.
As for your specific question:
The ?? is the - unhelpful - representation of the csreq columnn value from the TCC.db database and is not a problem per se; OSX manages that column behind the scenes; it contains a fingerprint of sorts identifying the application in its specific current form (similar to an MD5 hash, though I have no idea what is actually being used), so as to be able to detect tampering later.
However, I suspect you may be looking at the wrong database entry:
I'm puzzled by your bundle ID being com.atonus.open-cubase: if your app is an AppleScript-based *.app bundle, its bundle ID would have the fixed prefix com.apple.ScriptEditor.id., e.g., com.apple.ScriptEditor.id.open-cubase. Did you manually modify the bundle ID via the bundle's Info.plist file, or am I missing something?
When the OS determines tampering/a change in an authorized application:
It resets the allowed column value to 0, i.e., revokes authorization
It resets the csreq column value to NULL.
Thus, after you've seen the ... is not allowed assistive access dialog, the database entry should be reported as kTCCServiceAccessibility|com.atonus.open-cubase|0|0|1| - note the changed Boolean flags and the absence of the ?? at the end.

Firefox extension: Secret Agent - User Agent String Randomizer - Application testing

Extension Link: https://www.dephormation.org.uk/?page=81
This plugin is great. It has one problem though, on pages that use AJAX to make http requests, it switches the user agent for each request and confuses many ajax applications.
What I want to do is figure out where the preferences for this plugin are saved. Particularly, where all the User-Agent Strings that are currently being used are located. I would like to do this so that I could edit these settings outside of firefox before I open the browser so as to "hot swap" one user agent string for each browsing session at a time. I have looked through all kinds of .sqlite databases in my firefox profile but still haven't found the information.
I am using Watir-Webdriver with ruby to application test.
As Mr Palant said... simply changing general.useragent.override would achieve what you want.
Type about:config in the address bar, accept the warning, and filter on useragent and you'll see the setting.
I gather (but haven't tested) this preference may not affect the user agent presented to client side Javascript code. So if your Ajax code references navigator.useragent you might find the real user agent is returned despite your override setting.
Pete (author of SecretAgent).
www.secretagent.org.uk
PS See also
https://developer.mozilla.org/en/Document_Object_Model_%28DOM%29/window.navigator.userAgent
You don't need an add-on for that - changing general.useragent.override preference (create it if not present yet) is enough to set a different user agent string. In Firefox you can do it under about:config, when Firefox isn't running you can add this preference to the file prefs.js in the Firefox profile.

Resources