Our internal app (written in FoxPro) was designed to allow the user to email reports. The app would use/launch Outlook by default ONLY if the user had a default profile already configured; otherwise, the app would use a custom built client.
In order to accomplish this, we looked at Registry settings to see if a default profile existed. Here is the code (FoxPro):
IF oReg.IsKey('',[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles]);
AND oReg.OpenKey([Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles],HKEY_CURRENT_USER) == 0;
AND oReg.GetKeyValue('DefaultProfile',#lcProfile) == 0;
AND !EMPTY(lcProfile);
AND oReg.IsKey('',[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\]+lcProfile+[\0a0d020000000000c000000000000046]);
AND oReg.OpenKey([Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\]+lcProfile+[\0a0d020000000000c000000000000046],HKEY_CURRENT_USER) == 0;
AND oReg.GetKeyValue('001e023d',#lcProfileFav) == 0;
AND '.fav' $ LOWER(lcProfileFav)
I've determined that Office 2013 uses a different registry structure for storing its Outlook profiles. However, the key that I've always looked for in the past to determine the default profile (001e023d) is no longer found in the \0a0d020000000000c000000000000046 registry entry.
Is there any way to ensure that the current user has an existing profile before attempting to launch Outlook?
Check to see if there are any profiles at all. One of them will be the default one.
Related
I wanted to create an account in standalone application like in Outlook.
Have gone through MAPI interfaces Click here! but can't find anything useful.
Also looked for the Account Manager Api Click here!
But here you can only view already added accounts. If you want to create account using Account Manager Api , it will prompt a dialog box for adding an account. Which is of no use for me because I want a code for the same.
Please let me know if there is any solution.
The parts of the IOlkAccount interface related to creating new accounts are not documented. You can use MAPI to add Exchange and PST accounts.
If using Redemption is an option (I am its author), it allows to add POP3/SMTP accounts using RDOAccounts.AddPOP3Account.
I am working in Cocoa.
I have made changes to my application as per the answer recommended by link
I have following questions:
Can I add my app to System Accessibility List programmatically after taking users consent, so that it is seen checked in System Preferences > Security & Privacy > Privacy > Accessibility.(Like they do it in iOS where app requests user to show notifications, and user can choose between Dont allow and Ok).
After the application is successfully added to the Accessibility list how do I get the value of checkbox in Accessibilty list programatically ?
I am expecting a sandbox/"app store" compatible answer
You can have 1) done automatically by passing in kAXTrustedCheckOptionPrompt whilst querying 2) with AXIsProcessTrustedWithOptions:
NSDictionary *prompt = #{kAXTrustedCheckOptionPrompt:#YES};
BOOL accessible = AXIsProcessTrustedWithOptions((CFDictionaryRef)prompt);
This will provide whatever the current system standard dialog is for the user consenting to trust your app.
Microsoft's policy says:
The following requirements apply to applications that receive the
location of a user's mobile device:
2.7.3 Your application must provide in-application settings that allow the user to enable and disable your application's access to and use of
location from the Location Service API.
I included ID_CAP_LOCATION in my manifest for an AdMob (google mobile advertising) control only - Do I need to add that in-app settings disabling location and tell user that the application uses location services on the first launch for successfully passing the certification?
In Google's own documentation, they say:
Google asks that you only specify location data if that information is already used by your app
The suggested interpretation of Microsoft's certification guidelines would be that to be accepted on the store, if you're going to use the location of the user (even if only to pass to an advertising control) you should be up front about that and allow your customer to disable that option.
So, to summarize, I would suggest not using the location unless your app has another reason to do so (to keep Google happy), and if you choose to use locations, I would recommend being up front with (one-off) message on first launch, and the ability for your customer to disable it (to keep Microsoft happy).
I'm writing an application for some Geolocalization.
How can i programmatically enable / disable location service from my application? like a settings page into my personal application ?
In your application you should try and use the Location service (GeoCoordinateWatcher), you should then check the Permission property, if this is set to Denied then this means that the user has, externally to your application, disabled location services on their phone therefore this is all you need to be concerned with. You can display a friendly message telling the user that certain features within your application will not be available but you leave the decision, to enable location services, up to the user.
The following article details the watcher_StatusChanged event handler, which includes the above check :-
http://msdn.microsoft.com/en-us/library/ff431782%28v=vs.92%29.aspx
I have pasted below the screen shot of the error report which I received:
The application cannot be tested for compilance for wp7 application certification requirements due to geographic,hardware or software limitations.Please provide valid test account credentials with resubmission
Notes:
Double check that the capabilities required by your application are declared correctly.
Avoid hard-coded logic based on the orginal Product ID.If your application design requires using logic based on a product id,use the windows phone marketplace assigned non-volatile product id instead.
A couple of things that might help:
If your app requires credentials to work, you can create a dummy user for testing purposes, and provide these credentials when submitting the app to the marketplace.
About the capabilities, you should declare all the phone features that your application uses. This is done through the Properties/WMAppManifest.xml file in your project. You should check this MSDN article for extended information on each capability. By default, all the features are declared, so you should remove the features that you won't be using.