Integrate Windows 8 program with windows search - windows

I want to know if it is possible to have data from my Windows 8 program be able to show up in windows search. For instance, the user could search for "myprogramdata1" in windows and then an item would show up that when clicked would open up my program and I'd be able know that "myprogramdata1" was selected.
EDIT:
I know that it is possible for windows 10. For the program DisplayFusion, if I search settings, there is a result for DisplayFusion settings that can be clicked on and will bring me to the settings page for the program. Does anyone know how this is done?

First of see if you say the command that you typed in using cortana and if it opens settings. If yes, You can absolutely do it.
I did it for one of my app too( Well this was not my intention but it works )
UWP Samples-CortanaVoiceCommand
The key here is once Voice Commands are installed, you can type the text in cortana search (instead of actual voice command) and it works the same. You can still use patterns of voice commands and still type in Cortana search and open your app.

Related

How to hide terminal shell on server application like Warp in Windows?

I have a small warp server project on Windows that listen to a particular port and do something whenever I send a command to it by REST (for example: POST http://10.10.10.1:5000/print). It's a small client for printing PDF / receipt directly from another computer.
It works. But my problem is when I had to package the whole project, the Rust compiler give me an executable file (.exe). The application displays a terminal window when I run it. I want this terminal to be hidden somehow.
I try to run the program as a windows service (by using NSSM). It doesn't work for me since I had to access the printer. Windows doesn't allow my app to access any devices or any other executable as a windows service. (The reasons are explained here: How can I run an EXE program from a Windows Service using C#?)
So I plan to run my app as a tray-icon application so user can control or close the app. (https://github.com/olback/tray-item-rs)
Unfortunately, I still cannot hide the app's terminal window.
Another solution that I found is hstart (https://www.ntwind.com/software/hstart.html). But I would like to use this as "the last resort" solution since many antivirus/windows defender mark it as a malware.
Do anyone know how to hide or get rid of it ?
After lot of searching, It turns out to be easier than I thought. Just add
#![windows_subsystem = "windows"]
on top of your main.rs file. (for rust > 1.18) and the terminal is gone.
These control the /SUBSYSTEM flag in the linker. For now, only
"console" and "windows" are supported.
When is this useful? In the simplest terms, if you're developing a
graphical application, and do not specify "windows", a console window
would flash up upon your application's start. With this flag, it
won't.
https://doc.rust-lang.org/reference/runtime.html#the-windows_subsystem-attribute
https://blog.rust-lang.org/2017/06/08/Rust-1.18.html
https://learn.microsoft.com/en-us/cpp/build/reference/subsystem-specify-subsystem?view=msvc-170

Mac - Showing my service in printers list

I created a Mac app/service that will be shown in menu bar (and not in dock) that will take care of printing through my cloud server.
What I'm looking is to show this as part of printer list. For example, when a user wants to print a word doc from MSWord, click on Command+P which shows the printer UI where user can select the printer. Now I want to show my app/service as part of the printers list so that the doc can be printed directly using my cloud server.
Is it possible to do such thing. Or any other ideas will be appreciated.
Thanks in advance.
--satyam.
We have to create a device driver. It cannot be achieved using regular application development in Java or Objective C.

How to change 3rd monitor programmatically

When I'm using my laptop, I use 3 displays:
The laptop display
A second monitor (connected through VGA)
A TV (connected through HDMI)
My videocard doesn't support 3 monitors, so I'm constantly switching from 2 to 3: when I'm on the computer, I use the 2nd monitor, and when I want to watch some movies, etc. I use the 3rd.
I currently have to go to Screen Resolution, select the monitor that is not in use, and choose Extend desktop to this display.
Is there a way I can automate it?
Is there any command-line tool, or any Windows API that allows doing it?
Edit:
Display Changer seems to do what I need, but the problem is that it only detects the working monitors. The 3rd monitor (which isn't currently in use) isn't detected, so I can't attach it.
A bit of RE on DisplaySwitch.exe shows that it calls
SetDisplayConfig(0, NULL, NULL, NULL, 0x888)
to set it to Extended on my computer.
From there, a little digging around got me to the SetDisplayConfig documentation obviously and also this SO page with some example code that queries your current display state and adds the actual flags to change them if you want to do so.
I answered a similar question with suggestion to try UltraMon or use their SDK, but you can also hit the Win32 API directly with ChangeDisplaySettingsEx. Another user, Sai, gave an reference to an example showing use of the function.

Windows 7 Taskbar Widget or Toolbar

My Lenovo laptop has two task bar type programs that show the network status and battery status. I have been trying to search for what these types of widgits are called. Unfortuantly my google-foo is only returning results for minimizing programs to the system tray.
I am not even sure if these are system tray apps or taskbar apps. but either way, please help me find a API reference or even better a tutorial.
I want to make a Work Week Widgit, that displays the current work week number on this widget. I program mostly in python, but am willing to learn another language just to make this tool.
They are known as Desktop Bands, also known as DeskBands. Note that Desktop Bands are not recommended starting in Windows 7. Note also that since they are shell extensions, they must be written in native code.

Why does the SearchTask show a prompt?

In my Windows Phone 7 app I'm using a SearchTask to show the results of a web page. But every time I start the task I get the dread "Allow" screen. I can imagine many users being scared to death by this... Why do I need to be allowed to show the results of a web search result? Is there anyway to avoid showing the scary popup screen?
Fwiw, here's my code:
SearchTask task = new SearchTask();
task.SearchQuery = "<my query>";
task.Show();
The prompt for the search app to use location will only be dislayed the first time the search app is used on the phone.
If you are seeing this displayed more than once is it because you are closing and restarting the emulator between uses of the task?
If not can you provide details of how to recreate the behaviour you're seeing.
The prompt is controlled by the search app and it is not possible to change the behaviour of that app. It is also an intent of the phone that apps should not be able to don something without the user knowing. By default the search app tries to use location to provide context when retrieving results. If the user has privcay concerns about their location data being used in this way they can prevent it. Hence this prompt.

Resources