C# Alternative window's shell not displaying - c#

I am writing a very simple alternative shell to replace explorer.exe the shell is run on Windows 10 Enterprise. I set up the C# Windows Form application to display as the alternative shell in the registry and pointed it to the \share folder.
When Windows boots and logs me in I get a black empty screen. If I run explorer.exe through the task manager - I does not load the Shell but the folder explorer. So Windows recognises that an alternative shell is being used.
So why is the form not displaying?
There is no code to show as the form is simply a form with a single label on it saying running.

Easily solved when I thought about it.
Shells cannot be started from a Shared network folder - the executable must be on a local drive.

Related

C# Console Application - Shortcut not apears in the "Sent to" menu

I build a C# Console application that takes a file in parameter, format it and save the result in an other file. I've built the application successfully using ClickOnce. Now I want to be able to click right on a given file and "Send To" my application. As for other application, I've sent the shortcut to the C:\Users\MyUser\AppData\Roaming\Microsoft\Windows\SendTo repository but unlike other shortcut, my application is hidden from the menu. I've tested on few other PC (also running under Windows 7) and I always get the same behavior.
Do you know if it's caused by ClickOnce? Is there a way to solve this issue?
FYI, I finally bypass the ClickOnce solution and use the plain .exe instead. The post below describe how to achieve it:
Why are my binaries not placed in the /bin/release folder when I build a Windows Service in C#?

Programmatically changing assembly (application) name?

I have a WPF project running on Windows 7 Embedded & Windows 8 Pro. In the taskbar when the application is pinned and I right-click the application icon, the C# project name pops up. Is there a way to change this name programmatically?
I want to load the application name from an .ini file at run-time.
UPDATE:
I have prior to asking this question searched and reviewed the other question that asks a similar, but different question on how to change the file name after compilation. I do not want to change the file name, just the name on the taskbar after right-clicking the application icon that is pinned.
I would say there is no "easy" way to do it, necessarily.
I would assume you have to run some sort of script or use Powershell.
Using method ?, create or rename a shortcut to your .exe with the name you want to show up in the pinned application.
Start the application using the shortcut. (At this point the "application name" in the task bar is the name of the shortcut used to launch your .exe)
Pin the application.
Shortcut is added to AppData, and the application will remain the same name of the shortcut.
Here was my pinned task bar info: C:\Users\me\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
You could also probably modify the registry and add the shortcut straight to the folder listed above, then reload explorer.exe, but you have to worry about user permissions and what not. Either way, this should give you something to roll with.

Creating and making an shortcut appear on Start Menu

I'm maintain an Pocket PC 2003/CF.NET application and would like to
automagically create an shortcut on Start Menu on first run.
So far, so good. I created the LNK file and put it on Start Menu folder,
but Windows only shows 7 app slots on it - I had to manually uncheck an
app to make it appear on Start.
How to automate that?
Wow this takes me back
When you install using an inf file via cab install adding more than 7 shortcuts to the start menu they will end up in the \Start Menu\Programs.
I don't think you can automate removing items from someone's startmenu bar as this could be malicious.

Control console font & layout used by C# .NET console application

How can I set Windows (or Visual Studio, or my application) so that when I run a console app by hitting F5 from Visual Studio 2010, I can get a 120x50 layout with my choice of font, instead of the 80x25 standard CMD/DOS window?
(even better - anyone know how I can get VS to run console apps in something like Console2 or bash instead of cmd.exe ?)
Run a program from VS as normal (ctrl-f5, or f5, or whatever) and then from the system menu (click the icon in the upper-left corner of the window), choose "Defaults". Alter your settings as you like, and save them. From then on, new windows should be launched according to those settings.
As for running your program in something other than "cmd.exe", you should be aware that "cmd.exe" is not involved at all in the window. The window is a normal console window, and "cmd.exe" didn't create it. In the same vein, "bash" wouldn't be involved, because that's a command shell, not a windowing program.
Cmd.exe and bash (and a whole host of others, including 4nt, command.com, and everything along those lines) are not windowing programs, and they don't create windows. They're console-mode programs, and Windows automatically creates special "console" windows for them to run in. Windows knows they're console-mode programs because there's a flag in the .exe file (which is a file format called PE) that specifies what type of application it is.
Console2 is a program that hosts console applications, and in theory could be used, if Console2 allows you to start it and an external program at the same time. In your project properties, under the "Debug" tab, change the "Start Action" option to "Start external program:" and type in the command line that will start Console2 and your program together.

C# Updater for Windows App

i developed an updater application for my windows app. They are different projects under the same solution and they run as different processes. when i run the app it checks for updates at startup (as another process). when i click update button it tries to download files to the installation location. (i am using the .exe in debug folder i don't create setup file) Everything works fine but the main application (app.exe) can't be overwritten because it is used by update process. but in update process i kill app.exe and app.exe goes from task manager too. i couldn't find anything, how main app.exe is used by update. has anyone any idea how update uses main app ? how can i watch it? in which line it starts using the other app?
Rename app.exe
Insert new app.exe
Close running, old app.exe
Start new app.exe
Check for renamed app.exe (in newly started app.exe)
Delete old, renamed app.exe
If the updater app has a reference to the main app exe, it will keep it locked. If that's the case, can you remove the reference to the main app from the update app project? This may need moving some code directly into the updater's source.
To find out who has a hand on your process you should start ProcessExplorer. There are some spy glasses in the menu bar. Just click on it and see which process holds a handle to your app.
Do you need to invent your own? There are existing solutions that you may be able to leverage that already do this. Microsoft ClickOnce supports this if it fits your deployment model.
A quick google search turns up a few things as well:
http://csautoupdater.sourceforge.net/
http://www.codeproject.com/KB/vb/Auto_Update_Revisited.aspx

Categories