I am developing a lightweight WPF application that will take multimedia files from either the local file system or removable media devices and upload them to Amazon S3 cloud storage. One of the project requirements is for Windows 7 to recognize when a device (e.g., camera, SD card, etc.) is detected and make my application one of the AutoPlay options.
We are NOT requiring the uploader application to AutoRun without user interaction. I simply want to get my application added to the list of avalable AutoPlay event handlers.
I'm aware that a number of registry keys must be added to the HKLM hive in the Windows registry. My research seems to indicate that this is not possible with ClickOnce installation (which is the install method desired for this project), but my information is a couple of years old.
Is is still the case that a full-blown Windows Installer is required to make this a reality? Or is there some method of achieving the desired result with a ClickOnce WPF install?
Related
I'm converting a suite of legacy 32 bit C++ apps to run under Windows 10. These apps can run under different user accounts on the same PC and need to share the data between themselves and all the users. Some of the apps are Windows services, some are regular UI apps. There's a lot of communication between the apps and sometimes this is accomplished using shared data files. All the different user accounts need to access the shared data...
I have tried storing the shared data in C:\Program Files (x86)\Common Files\AppName\data
and have set the security level on that folder to Full Control for All users.
Most of the time, this works perfectly well. But occasionally, at seemingly random intervals, one of the shared data files ends up in:
C:\Users\UserName\AppData\Local\VirtualStore\Program Files (x86)\Common Files\AppName\data
I have tried to replicate this, and it never happens when I'm looking...
If I run a simple UI app that just writes to this folder, everything is fine. The App does not need to run with elevated privileges to write to the folder.
I suspect it's when one of the Apps is trying to write to a file that is locked by another, which the code handles by using exceptions, but Windows tries to help out by writing to the VirtualStore instead. But I could be wrong...
So, to cut to the question:
Where is the 'best place' to store shared data between several apps AND user accounts, that won't end up in the VirtualStore?
Andy
Any application with a requestedExecutionLevel node in its manifest is marked as Vista compatible and the redirection to the Virtual Store is disabled.
The requirement is to be able to run a kiosk application on Windows 10 which has unrestricted capability on the host computer to make arbitrary system calls and launch any kind of app including Appx and Win32. The kiosk app can be fully trusted - it may be thought of as a side-loaded in-house app for machines equipped with conventional keyboard and mouse to be used in a public setting. The user should not be able to circumvent or escape the kiosk app.
Assigned access fits the general idea, except that assigned access only works for Appx which are not full trust (no access to the needed APIs to launch Win32 apps, etc.). These restrictions appear to be by design, so it would be unlikely this approach could successfully meet the stated requirements. Although it is possible to author a WPF app as a "full trust" Appx, it won't work in kiosk mode.
Replacing the Windows shell with a custom one (the kiosk app) would work except that some of the tasks the kiosk app needs to be able to perform require the presence of the explorer shell (e.g. launch an Appx - requires services provided by the explorer shell).
Running a Win32 app above the lock screen might be a solution, if it were possible (I believe this is what assigned access does with its Appx).
Running an app in any normal fashion would require that many hotkey combinations are disabled or intercepted, including [CTRL][Alt][Del], which seems to be a major issue/challenge. It seems there is no way to prevent the user from invoking task manager or otherwise circumventing an app to gain unsecured/unmediated access to the system.
Is there any way to meet the requirement as I've outlined? If so, what is the technique and (if relevant), what APIs are central to the approach?
Update:
Although the full-trust converted WPF AppX could be installed and selected for assigned access, it "did not work" because of some issues found to have been recorded in the event log, specifically: Applications and Services Logs > Microsoft > Windows > Apps > Microsoft-Windows-TWinUI/Operational. Observed behavior was that upon user login, a blue screen would be displayed with the familiar Windows spinner, which would flicker every second or so as if something was being retried over and over. The associated event log messages (all source "Apps") are:
ActivateApplicationForContractByAppIdAsUserWithHost of the app LockDownSample_y1sem70fxfdf6!LockDownSample for the Windows.Launch contract failed with This app does not support the contract specified or is not installed.. (Event ID: 5985)
The app LockDownSample_y1sem70fxfdf6!LockDownSample is not registered for the Windows.Launch contract or is not installed. (Event ID: 5951)
The app Microsoft.WindowsMaps_8wekyb3d8bbwe!App is not registered for the Windows.PreInstalledConfigTask contract or is not installed. (also Event ID: 5951)
Activation via contract helper of the app Microsoft.WindowsMaps_8wekyb3d8bbwe!App for the Windows.PreInstalledConfigTask contract failed with Class not registered. (Event ID: 5990)
Is this due to an intentionally imposed limitation, or is this something which can be resolved?
Update 2:
Found this recent question:
Windows 10 assigned access app fails to start due to not registered for Windows.Launch contract
This fairly accurately describes my experience with Assigned Access for a full-trust kiosk app, concluding with the answer "not yet supported".
Hi How do I delete a local file in my application after copying it to the IsolatedStorage?
I want to delete only the file in local folder. Not in the Isolated Storage. I'm using WP 7.1.
tnks
You don't have write access to the folder where your application is installed. It's therefore impossible to delete the file.
Windows Phone is designed to be one of the most secure environments in the mobile market. If you look at many of the standards it enforces you will see that this is a consistent theme.
For example:
Your app does not have the ability to intercept calls or text
messages (though the library exists)
Your app cannot modify hardware buttons (there is a few MINOR
exceptions to this rule like manipulating the back button event)
Your app cannot access memory locations outside of the Isolated
Storage it is assigned by the phone.
These standards are put in place to protect the user from malicious software and to keep a clean and consistent feel across the environment.
I need to write an application that can detect if the "Bing - Get me there" application is installed on the current phone and if so, launch it.
Is this possible? The app would need to do this for other external applications as well, so a generic method or interface for this would be helpful.
Applications run in a sandbox on Windows Phone and there is no way to tell if other applications are installed unless you are writing both of them and you use a method to announce to other applications that you are installed and they know how to read that announcement.
2 approaches to such announcements would be:
Have both (all) apps synchronise with a web server and report which devices they have been installed on. The apps can the query which other apps have been installed on that device.
Have all apps write a file to a location where all apps can access. The only place to do this is the PicturesLibrary so you have to embed the identifier in the name of the image or in its contents and be able to query all images to identify the other installed apps. The user could manually delete any images you create in this way though.
Beware, neither method can tell if the other app has subsequently been uninstalled though so this is far from foolproof.
As far as I know, there's no way to do that.
Applications on Windows Phone run in complete isolation, and can not act with other applications, other than some highly specialized apps (i.e. for playing media).
I'm creating a multiplayer game for windows phone 7. How can I run multiple instances of the emulator in order to debug it?
You can indeed run multiple instances of the Windows Phone 7 emulator at the same time, and even debug them simultaneously, as I show in my blog post.
Open the folder [Your Drive Letter]:\ProgramData\Microsoft\Phone Tools\CoreCon\10.0\addons
Locate the file ImageConfig.en-US.xsl
Take a copy of it, leaving it in the same directory, and name it something like ImageConfig.en-US 2nd Instance.xsl
Open the copy in a text editor.
Locate the element DEVICE and change it's Name attribute, also assign a new GUID value to ID.
Scroll down the file to locate the part that says PROPERTY ID=”VMID”:
Put a new Guid inside that element – make sure though that you use capital letters rather than lower case.
Save the file
Re open the XAP deployment tool, or Visual Studio, if you already have them open, and you’ll see your new Emulator instances.
See the blog post for more details, and screenshots to clarify some of the steps
You can only run one instance of the Windows Phone 7 emulator at a time on a single machine - that's set by default, and if you don't want to mess with custom configurations. When you deploy from Visual Studio, the same instance is shared between the running instances of the development environment.
However, you can create additional instances of the WP emulator if you follow the instructions in this article. Make sure you backup the config files before editing them.
I had the same problem, trying to test my multiplayer game, and i eventually bought a WP7 device (HTC HD7) on ebay, unlocked it for development purposes, and used it and the emulator for testing.
Since I have experience with the android environment, I can say that denying the possibility of multiple emulator instances really damage the development efforts. Hope Microsoft will change this.
BTW, i'm using the Skiller SDK for the multiplayer and social side of my game (Their official WP7 SDK will be avialable in a few days, and you can download it from http://dev.skiller-games.com). I totally recommend it.
Good Luck.