windows explorer open folders restore - c++

In order to update some desktop icons, I want to stop & restart Windows Explorer (WE), but without losing the currently open folders.
To accomplish this, I either need to save the currently open folders and then restore them on my own or find out where WE keeps the list and have it restore them for me.
Any thought or comments will be most appreciated.

If you have changed registered file-type icons you can just call SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);.
You can use IShellWindows to get information about open Explorer windows but I would recommend that you try using Restart Manager (example application) instead.

Related

How to debug code in Sitecore

I would like to debug the Sitecore code just like asp.net code, but do not know how to.
The solution is outside wwwroot.
Using Visual Studio 2013, IIS 10.0, Windows 10, Sitecore 8
Does attaching a process, is all I have to do to be able to debug.
In Visual Studio, when I click on Tools > Attach Process, there is no aspnet_wp.exe or w3wp.exe.
Is there any other process to follow.
When you try Debug > Attach to Proces please make sure your site is running.
Please also check if "Show Process from all users" is checked.
See below picture:
You can use dotpeek to debug the Sitecore Code.
Steps to debug Sitecore Code:
Download and Install Dotpeek.
Open dotPeek and click on StartSymbolServer default dotPeek uses port 33417.
Open Visual Studio options
In Debugging/Symbols tab click on add new symbol files location and enter http://localhost:33417 (or the port that you assigned in the previous step)
In VS options go to Debugging/General and uncheck “Enable Just My Code” option if it is checked
In dotPeek click on open icon that will show a dialog for loading an assembly
After the assembly is loaded right click on it and click generate pdb. In the appeared window choose the namespaces that you need to debug (or each one as I did) and click Generate
Now we are ready for debugging
Open VS and attach to the sitecore process (loading symbols may take longer than usual)
More info: http://bilyukov.com/debugging-sitecore-dotpeek/
Note: You can also export the Sitecore dll to a VS Solution in dotpeek along with its pdb file, then follow the above steps to configure your VS. You need to attach to the Process of the exported Sitecore Solution.
I use Attach to Process in Sitecore rocks.
Sitecore Rocks can be found in the Visual Studio Marketplace via the Tools | Extensions and Updates option in visual studio. Search for Sitecore Rocks in the Online folder.
If you want to attach to w3wp.exe you have to make sure the website is running in IIS under its own app pool with its own domain binded as well as host file updated to associate that domain with localhost 127.0.0.1. If you need more help, along with simplified detailed instructions, please reach out to me.
You can do one thing in this case. Go in Visual Studio to Debug > Attach to process....
Now you'll see a window containing available processes. We need to connect to IIS , hence mark the checkbox saying Show processes from all users. Once you do that, you'll find a process w3wp.exe. Jut select it and click Attach.

Windows Store deployment file from folder instead of MSI

I want to ask you a couple of questions i looked in internet and didn't found an answer though...
I have an application for windows 10 PCx64 (artifacts of a built project C++/x64)
Is it possible to create odrinary Windows Store deployment file from folder?
How to do that? As i see MS is pushing new 'universal applciations' concept. But i don't want to rewrite apps entirely to .net/c#/Universal Apps. I just want to change build process so it will produce windows store deployment file, not MSI
Thanks!
You will soon be able to create a Windows Store package for a Win32 app and deploy it through the Windows Store. You'll even get access to UWP APIs and services :)
Subscribe to the "Windows Developer Preview Programs" to get some fresh news about "Project Centennial".
https://devpreviewsignup.windows.com/

Windows console app opens in new console instead of the same console

I do have a Windows console application, written in C++ and compile with the console subsystem but when started from the command line, it does open a new window instead of reusing the same console window.
It seems that the cause is that executable has a manifest that requires admin privledges in order to run.
This was added in order to be able to properly read some keys form HKLM.
How can I solve this problem?
You do not need to specify a requestedExecutionLevel of requireAdministrator in the application manifest in order to make it able to read from HKLM without virtualization.
You do not need to elevate in order to read from HKLM. And so long as your process has an application manifest that specifies requestedExecutionLevel then it will not be virtualized. The conclusion therefore is that you need to specify a requestedExecutionLevel of asInvoker.
Details of registry virtualization can be found in the MSDN docs.

Update remote File using Eclipse's RSE Plugin

I've installed the Remote System Explorer Plugin for Eclipse and set up a SSH connection to our development server using public key authentication and a custom Port (not sure if any of these customisations relate to the problem).
However browsing the file system works great and I can even create folders and files. E.g. /tmp/foo/bar.txt but I can't figure out to "push" changes I've did to the server.
So my problem is I open a file, write some text and save it in Eclipse. The asterisk next to file names vanishes (indicating it's save) and if I close an re-open the file in Eclipse the changes are present. But they're not visible on the server. E.g. doing changes to a .html file won't show any changes in the web browser or cat bar.txt (mentioned earlier) produces an empty output.
Creating folders or files is working as intended but updates to file contents are not shown up on the remote system though they're persist in Eclipse.
Is there some button I'm missing to update my "local" changes to the "remote server". Can I even get rid off all this caching? As we're working in a Team it's crucial our Files are always up to date and having some extra caching would definitely spoil all the fun :(
My IDE configuration is like that :
Eclipse IDE for C/C++ Developers
Version: Juno Service Release 2
Build id: 20130225-0426
Get a handle to the IFileService that is hosting the file ... this gives you the ability to upload files.

startup application using adminstrator privilege vc++

Am working on a vc++ background application which installs in the program files folder. It works fine when it was manually started, it creates xml file in the same folder. But however the application is not creating the file when it was configured to startup.
Even when I provide the requireAdministrator privilege it is not creating the file at the startup.
This is same as the issue with Granting administrator privileges to an application launched at startup without UAC prompt?
but when program runs as Administrator it doesn't start at startup, this is my problem
But am working for a solution in vc++.
Please help am working on this more than a week
Did you add a proper manifest to your project?
In VC++ you must add one(http://msdn.microsoft.com/en-us/library/windows/desktop/bb756929.aspx)
Move the XML file to ProgramData (CSIDL_APPDATA).
I assume you have UAC enabled (i.e. UAC prompt appears). If that so, you would see it always when you start from Explorer, and will not see from Admin mode Visual Studio (since VS is elevated), and hence your process would be elevated.
But, when your process starts, the UAC won't appear, and your application will fail to start. It is best bet not to make your application requiring Administrator rights (why do you need?). You can save the data in some other folder.
If you must, you may need to create a service, which would start your application in elevated-mode (yes, without any UAC prompt).
Do check the system event reporting for your application, since this cannot be easily debugged.