Can I run the winRT application as a screensaver?

Is there any way to make my winRT application as a screen saver in xaml?

+4
source share
2 answers

According to Jerry, there is no easy way to make a Windows Store app splash screen. However, there is a round robin solution that may work for you on Windows 8, but not on Windows RT. Almost everything works for me. I will tell you what I have.

A screensaver is just an executable file with the extension .scr , which is stored in C:\Windows\System32 . For example, see C:\Windows\System32\Bubbles.scr . The solution I have in mind is to create a .scr screensaver, whose sole purpose is to launch the Windows Store application, which, as you say, will use XAML.

It is not possible to start the Windows Store application from the command line directly, so you will create an application to run. Take a look at the blog post called Ashwin Needamangala Automation for Testing Windows 8 Applications. Go through the article, find the Automate Activation section of your application . It contains an example C ++ application that can run applications for the Windows Store as follows:

C:> Win8AppLaunch.exe Microsoft.BingNews_8wekyb3d8bbwe! Appexnews

The sample run on this page needs to be changed, but before you do this, just copy the code into a C ++ console application:

enter image description here

You are almost ready to test it from the command line, but you need to specify the application name as AppUserModelId . Details are in Ashwin's post, but to rephrase, you first want to allow PowerShell scripts to run on your system with:

PS C:> Set-ExecutionPolicy AllSigned

Then run this PowerShell script:

 $installedapps = get-AppxPackage foreach ($app in $installedapps) { foreach ($id in (Get-AppxPackageManifest $app).package.applications.application.id) { $app.packagefamilyname + "!" + $id } } 

You might like to run it in Windows PowerShell ISE . This is a pretty spot. Find the AppUserModelId your application, and then check Win8AppLaunch.exe at the command line, as shown above. This should launch the Windows Store application from the command line.

Then change your C ++ launcher to hard AppUserModelId your application, rather than parse it from a command line argument. I created the essence of this . The important part is the line in which I declare myApp .

Create a new executable file, rename it MyScreenSaver.scr and place it in C:\Windows\System32 . It will appear on the screen settings control panel. You can view the screensaver there, and it works. However, if you wait for the splash screen to start, it will briefly open the console window and will never be fully launched. I do not know why. I tried disabling console window creation by switching the project to a Windows application, but that didn't help. You can try this by changing Properties | Configuration | Linker | System | SubSystem Properties | Configuration | Linker | System | SubSystem Properties | Configuration | Linker | System | SubSystem on WINDOWS . This is a bit more since you will also need to change the entry point from _tMain to _tWinMain . Contact me through my blog if you want detailed information. My StackOverflow profile lists it.

At the moment, it works almost completely. You can try starting with an empty C ++ screensaver, which, as you know, works, and then copy it in the code above. If I have more time, maybe I will try it myself.

+3
source

Cool idea. But no.

If you want your application to really do something for Windows other than running as a simple application, you are writing an extension application. Here's the official word:

Extensions An extension is similar to an agreement between an application and Windows. Extensions allow application developers to extend or customize standard Windows features, primarily for use in their applications and potentially for use in other applications.

The following types of applications for extension are available:

Image provider for images (extension) When users decide to change the image of their account, they can either select an existing image or use the application to take a new one. If your application can take pictures, you can use this extension to have a Windows list of your application in the account settings control panel. From there, users can select it to create a new account image. For more information about this extension, see the Help topic in UserInformation. You can also check our sample account name.

Autostart (extension) When a user connects a device to a computer, Windows fires an AutoPlay event. This extension allows your application to be specified as an AutoPlay selection for one or more AutoPlay events.

Background tasks (extension) Applications can use background tasks to run application code, even if the application is paused. Background tasks are designed for small work items that do not require user interaction.

Camera settings (extension) Your application can provide a user interface for selecting camera settings and selecting effects when the camera is used to take photos or videos. For more information about this extension, see Developing Windows Store Device Applications for Cameras.

Contact Connector (Extension) This extension allows your application to register to provide contact information. Your application is included in the list of applications displayed by Windows when a user needs access to their contacts. For more information about this extension, see the Windows.ApplicationModel.Contacts.Provider Help topic. You can also check User Contact Management.

File Activation (Extension) Files that have the same file name extension have the same file type. Your application can use existing, well-known file types, such as .txt, or create a new file type. The file activation extension allows you to define a new file type or register for processing a file type.

Game Browser (extension) Your application can register with Windows as a game. To do this, you must create a game definition file (GDF), create it as a binary resource in your application, and declare this resource in the package manifest.

Print task parameters (extension) You can create an application that displays the user interface associated with printing and communicates directly with the print device. When you highlight features specific to a particular make and model of printing device, you can provide a richer, more advanced user interface.

Protocol activation (extension) Your application can use existing protocols for communication, such as mailto, or create your own protocol. The protocol activation extension allows you to define your own protocol or register to process an existing protocol.

SSL / certificates (extension) Digital certificates are used to authenticate one object to another. For example, certificates are often used to authenticate a user for web services over SSL. This extension allows you to install a digital certificate with your application.

cite: http://msdn.microsoft.com/en-us/library/windows/apps/hh464906.aspx

Unfortunately, nothing needs to be done with screen savers. The technical reason, at present, you cannot write a Windows 8 application that functions as a screensaver, because Windows 8 applications are fundamentally related to working in the WinRT runtime. This shell does not extend from the Start menu in the current version of Windows. Thus, there is no way to perform the appearance - as a screen saver. Screen savers are still building the "old way."

+1
source

All Articles