Stopping a c# system tray application in .net 3.5 - system-tray

I have a .net 3.5 C# windows tray application that is installed using inno. In the uninstall script I need to stop the application if it is running. I've tried several methods - all unsucessfully. Is there a standard way of doing this that I am ignorant of?
Simon

You can use the Taskkill to kill the process. Read more about Taskkill here: http://technet.microsoft.com/en-us/library/bb491009.aspx

Related

How to uninstall PowerShell 5.1 on Windows after installing 72

I just updated PowerShell to 7.2.1:
But the old is still installed:
How do I remove the old one? Having both installed is kinda redundant I suppose.
You don't. PowerShell Core (6+) installs alongside Windows PowerShell (up to 5.1). Windows PowerShell still contains proprietary code that has not yet been open sourced, or never will be in the foreseeable future. The main difference between the two is that PowerShell Core runs on .NET Core, and Windows PowerShell relies on .NET Framework. There is no more new development for Windows PowerShell, as new features find their way into PowerShell Core instead.
There are unrecommended and unsupported ways to purge the system of Windows PowerShell but you will very literally break parts of Windows in the process. As ofVersion 21H1 (OS Build 22000.466) Windows PowerShell remains a dependency of the core operating system and likely will be for some time yet.

Run Standalone Windows Powershell

My Application is dependent on PowerShell version 5. But some old windows system have not installed the same version where our application is running. So is there any way to run standalone PowerShell which I put in my application folder. So my application is not dependent on system PowerShell.
Disclaimer: We don't know your application and we don't know, why exactly it depends on PowerShell.
Further we don't know if it depends on Windows PowerShell or on PowerShell in general. We also don't know if it requires specifically version 5 or would run in newer versions too.
To answer the core of your question:
So is there any way to run standalone PowerShell which I put in my application folder.
Yes, there is!
Microsoft introduced PowerShell Core, which started as a fork and is a cross-platform edition that runs on Windows, macOS, and major Linux distros. You can download PowerShell binary archives from GitHub, extract them and just run pwsh.exe.
Please beware:
While it provides a huge amount of well-known PowerShell-cmdlets and some (most) of the Windows PowerShell behaviour, it is important to know the difference between PowerShell Core and Windows PowerShell. Refer to the repository's README for further resources.
No. You cannot have a portable version of Windows PowerShell for your application.
You also may not be able to install a newer version on an older operating system; e.g., you can't install PowerShell version 5 on Windows XP.
Windows Powershell versions depend on many things, such as OS Version, Microsoft .NET Framework, Windows Management Framework, WS-Management, Windows Management Instrumentation, Common Language Runtime, Graphical User Interface Requirements.
Here is a link with information about Windows PowerShell versions and their requirements.
I'd say it is best if you create your application so that it is compatible with the oldest possible version of PowerShell it will run with. It could be hard and tricky, but it's the only to way to ensure proper backward compatibility.

Windows server 2012 data center - Determine If it is a core version

I have a windows server 2012 data center server where I configured a web application. I can't tell whether it is a core version or not as I want to install other application which are not compatible with core versions.
The server is fully GUI enables but from google I found that core versions doesn't have GUI. And according to the following link, I went to the regedit and found out that it is a core version but my server is fully GUI and all applications like explorer are there.
https://msdn.microsoft.com/en-us/library/hh846315(v=vs.85).aspx
Is there a way a core version may have a GUI or I am missing something? How do I tell if is a core version?
Thanks
D.
As you can see in this link : https://msdn.microsoft.com/en-us/library/dd184075.aspx?f=255&MSPPError=-2147217396
The core version "GUI" is only a command line interface.
There are a few GUI programs you can run, the complete table is provided on the link above.
You won't be able to open any window explorer whatsoever on a core version.
Another way to test if Server Core is running is to check the registry under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion for the value of InstallationType. If it is set to "Server Core", then the Server Core installation option is installed.
I supposed this is what you tried to do.
To make it simple, if you have a start menu bar and other windows than the command line interface as you log in to your server, this is no server core =)

Why does my application triggers the Installer of another application?

When using a legacy VB6 application and opening some specific forms inside that application, the Windows Installer belonging to Microsoft Navision (which is installed on the same machine) pops-up like in the attached image.
It happens every time, but on this machine only.
The VB6 application has absolutely no relation with Navision!
What can be done to avoid this anomalous interaction between the two applications?
This is down to a corrupt windows installer database and your app is using some component that Microsoft Dynamics tried to install.
Your best bet is to remove and reinstall Microsoft Dynamics NAV, or use MSICUU to remove the "broken" package.
Update: MSICUU was retired in preference to the Program Install and Uninstall troubleshooter but I've not used this new utility.

installing a program on w7, .NET version 2.0 required

I am tryng to install a program on windows 7 but when i run tha installer i get a error message sayng: Please install .NET Framework Version 2.0 before installing the tool.
As i know the .NET 2.0 should be installed with w7 allready. So what might be the problem? Maybe there is a way passbye the checking in the installation.. or extract it or do something.
Just for more info i think its a installshield setup launcher. I tried to extract it but its not possible, getting the .net 2.0 missing error. So what i managed to do is to extract the msi from exe. And now when i run the -msi with /passive option from cmd the it indeed bypasses the .net check and everything gets installed. Now the problem is that im getting all kind of errors in the application so looks like its still not installed correctly.
My first guess is the program you install doesn't detect .NET 2.0 correctly. As you correctly mentioned, .NET 2.0 is pre-installed on Windows 7. See this article for complete picture.
While .NET is part of Windows 7, it's an optional component, though - you can turn it off.
Open the "Windows features" dialogue (by pressing start and typing/selecting "Turn Windows features on or off"), and make sure the "Microsoft .NET framework 3.5.1" is indeed installed.
If you're seeing errors in your app then maybe there's a problem with your .NET installation, or you have a client profile or partial install. What's the application you're installing - is it a server application?

Resources