RSS

Process Termination in C#

Just a write-up on a small application, so that I don’t forget what I did.

Problem:  An application keeps spawning multiple instances of msiexec.exe on a Windows 7 desktop computer. Typically, a user would have to go into the Task Manager and manually kill the msiexec.exe process to perform another install. This solution was to create an executable that I could just drop on my taskbar and start up whenever I needed to just kill the msiexec.exe proccess.

Solution: Created a simple C# console application to retrieve all the current running processes on a single windows 7 computer and kill any process named ‘msiexec’.

Example C# code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace ProcessGathering
{
    class Program
    {
        static void Main(string[] args)
        {
            Process[] myProcesses = Process.GetProcesses();
            foreach (Process myProcess in myProcesses)
            {
                if (myProcess.ProcessName.Equals(“msiexec”))
                {
                    Console.WriteLine(“msiexec.exe found and killed”);
                    myProcess.Kill();
                }
            }
            Console.WriteLine(“Press any key to continue…”);
            Console.ReadKey(true);
        }
    }
}
example code that assisted with this solution:
Advertisements
 
Leave a comment

Posted by on February 20, 2013 in C#, Code

 

Tags: ,

Finding the Volume Automation in Ableton Live

My issue was how to create a volume fade for the end of a recent piece and after some searching, I found some references to creating an automation line in the Arrangement view. Several of the clips that were in the piece had a drop down menu for controlling the volume and some did not. I wasn’t entirely sure how those tracks got them assigned, but ultimately, I wanted to have a volume fade on the Master track.

With some poking around within the interface, I stumbled upon the following, after right clicking on the Master track volume indicator.

After selecting the, “Show Automation,” you can then switch over to the Arrangement View and adjust the volume accordingly.

This is probably common knowledge for many seasoned Ableton users, but it wasn’t entirely intuitive for me. Once it was figured out, the result was exactly what I was looking for. I certainly like the way Ableton automation lines work and look forward to implementing them in many different ways.

 
Leave a comment

Posted by on August 1, 2012 in Ableton, Music

 

Use of Impulse in Ableton

I’ve completed my first go at using the Impulse module in Ableton and have to say that I like the results. A huge part of the improvement goes to the following video post. A very helpful introduction to using the Impulse module in Ableton. It really helped me to get my drum setup much more organized.

My completed first test is here: http://soundcloud.com/adain/impulse-test

 
Leave a comment

Posted by on July 29, 2012 in Ableton, M-Audio KeyStudio, Music, Soundcloud

 

Ableton setup with M-Audio KeyStudio…I’m a newb

As I’ve gotten back into the swing of writing music, I’ve recently added a Novation Launchpad and a M-Audio KeyStudio keyboard to my musical arsenal.

The version of Ableton that came with the Launchpad was the Live 8 Launchpad Edition. From a setup perspective, the Launchpad was relatively easy to get up and running. The two issues that I ran into was setting up the Midi Sync configuration and the Audio output.

There didn’t seem to be much documentation out of the box for the Launchpad in setting up the Midi Sync configuration, so I consulted Google and found a couple of articles concerning Ableton Midi Sync setup. After some experimentation, I found the correct setup.

For my own future reference, below is my current Midi Sync configuration for the LaunchPad and the KeyStudio.

For the Audio input issue that I ran into was more to do with the KeyStudio because it comes with a USB dongle that has a microphone input and a headphone output. During the install of the dongle, it appears to take over all outbound sound, which is fine if I was just using the KeyStudio by itself, but that’s not the case with my setup. Nor would I think it would be normal with anyone with an already existing DAW installed. The main issue was with working with Ableton, which had the master audio output going to the laptop audio output and when using the KeyStudio, the audio was going through the dongle. Two different audio outputs when trying to work on a new piece is frustrating if you you’re just starting to figure out all this new stuff. After some digging around, I found the following configuration items in the Audio section of the Ableton Preferences.

As you can see, I’ve set both the Audio input and output to the M-Audio dongle. I didn’t really need to set the Audio input to the M-Audio, but I just set it to keep it consistent with the output. Obviously, you can set it to any other recognized input device.

With no other issues encountered, I happily went about creating a rough test piece which can be found here on SoundCloud.

 
Leave a comment

Posted by on July 18, 2012 in Ableton, M-Audio KeyStudio, Music

 

Tags:

The Gratuitous ARP…some more…

The current list of potential fixes for this issue is very short and not entirely with consistent results.

Of note in the serverfault thread on this issue, is that Microsoft created a hotfix, http://support.microsoft.com/kb/2582281. In our testing, this hotfix didn’t correct the issue. Though, there were successful implementations of this fix, as noted on the thread.

From the Cisco forums and Microsoft forums, the following noted fix can also be attempted. “craft an NDIS driver and push out our own GARP with the SPA set whenever we completed asserting an IP address.” Though, we haven’t gone down this path yet, it seems several companies have implemented this fix with success.

We’ve created an in house solution that has had inconsistent results. I’m hoping further testing and development will allow us to come up with a much more robust solution for this issue.

 
Leave a comment

Posted by on May 13, 2012 in The Chain

 

The Gratuitous ARP cont…

Continuing on with working out what is involved with the Gratuitous ARP.

Secondly, it appears that the windows neighbor-cache (arp-cache) is only updated if the machine can no longer talk to the machine that is in it’s cache currently. It does not send out occasional ARP requests to make sure the cache is not stale.

This is the real issue faced in our current example. With the other systems not updating their cache’s in a timely manner (in this case, a couple of seconds is the most it can be down), we’ve effectively black holed the new server, IP wise.

Apparently, this is a known change in how Windows Server 2008 handles ARP Caching. Although, it seems that it is not a highly publicized change, but there is a very good Technet article on the change. The fundamental change is to the SPA field being set to 0.0.0.0. This way the ARP or neighboring cache’s are not updated with incorrect information. A more thorough analysis of a real example can be found here, http://blog.serverfault.com/2011/05/11/windows-2008-and-broken-arp/

The next part will look more into what are the current ways to get around this issue.

 
Leave a comment

Posted by on May 12, 2012 in The Chain

 

Some Life Lessons

Going to derail my initial topic a moment and share an inspiring article that I read this morning. It is titled, ‘101 Timeless Lessons,’ at Marc and Angel Hack Life. It can be found here, http://www.marcandangel.com/2012/05/11/101-timeless-lessons/

After the week I’ve had, I found several of these quite inspiring. Some of them deserve my own comments based on my current perspective of life. Here we go…

#3. Never let one bad day make you feel like you have a bad life.

An excellent reminder to pull your perspective way out to the 10,000ft level instead of the immediate concern of the day or the week.

#7. Sometimes the person you want most is the person you’re better off without.

And I should remind myself that there are people better off without me. It goes both ways.

#36. If you leave someone at least tell them why, because knowing you’re not worth an explanation is even more painful than being abandoned.

This week I learned this lesson, from the other side of the coin.

#53. The best way to gain self-confidence is to do what you are afraid to do.

I will be put to the test on this one next week. I can avoid tough situations or plow ahead and face the music.

#84. The best thing that you can do in life is follow your intuition.  Take risks.  Don’t just make the safe and easy choices because you’re afraid of what might happen.  If you do, nothing will ever happen.

A positive of this week is that the current scenario is because I took an immense risk. Doing something is always better than doing nothing.

#89. No relationship is ever a waste of time.  If it didn’t bring you what you want, it taught you what you do NOT want.

This week was another wonderful lesson of what I don’t want.

#101. Sometimes you have to stop worrying, wondering, and doubting.  Have faith that things will work out, maybe not how you planned, but just how it’s meant to be.

An excellent way to complete the list and helps put my horrible week into perspective.

I hope you find their list a source of inspiration and reflection. It certainly helped put a brighter light on a week that was less than superb for me.

 
Leave a comment

Posted by on May 11, 2012 in Uncategorized