Google Talk problem

Posted by Jeffrey Vanneste at 10:46 AM on August 24, 2005

Category: Useful Tools

So like everybody else today I'm trying out Google Talk. I find the voice quality is really good and even though the interface is really plain I like it nice and simple. I installed google talk on my home machine and whenever I clicked on the Inbox link nothing would happen. Everyone else in the house had no problems. When I tried at work and it didn't work there I was pretty upset. I didn't want to have to run the notifier and google talk.
I was pretty convinced it was something to do with the default browser (I use Maxthon). I tried setting the default browser to IE and everything worked fine, same with firefox. I tried reinstalling Maxthon, still not working. In the end I found a program called SetBrowser which is a simple freeware application that sets the default broswer to anything you want.

"A very simple program that lets you set the default web browser in Windows. Select the browser you want, and the program will modify the required registry settings."

So now the links work great. I tried finding other people having this issue on forums but I had no luck. Hopefully this helps out some people.

Executing commands on a remote machine

Posted by Jeffrey Vanneste at 11:32 AM on August 04, 2005

Category: Development

I've been working on some build improvements, one of which is eliminating the need to copy all our deployment files to each of the application servers after they have been put into a staging folder by NANT. Since NANT copies all binaries from a build folder to a staging folder and then when we want to deploy we have to copy all the files again from the staging folder to the application server it was becoming quite time consuming. If we create a single file installation from the build folder we can eliminate the need to copy to the staging folder and then we only need to copy a single file to the application server and execute it there.

What I wanted to be able to do from the build machine was tell another machine to upgrade to the new version without having to connect to any of the application servers. The problem here is remote execution of any commands on the application servers, so I started my research. I searched in google and found various programs that offered remote execution but some required installing software on the application server (not desired) or cost a lot of money. I first tried RemoteExec (about $120USD/license) which seemed to be the one that showed up in most of my searches. When I tested it out locally it worked great but as soon as I tried to execute programs on other computers on the network it was very unreliable. One time it would load up the program and the next time nothing would happen. With that and the lack of command line support (or at least as far as I could tell) I decided it was time to find something else.

In the end I found a wonderful program by sysinternals called PsExec (freeware too) that did everything that I wanted (and it actually worked). Nothing needs to be installed on the target machine at all. The only requirements are you need to have port 139 and 445 open on the target machine and you need administrator access. Since I haven’t decided for sure which installation package I will be using to bundle our deployment files into I wanted to make sure that a couple of them worked correctly. My first test was using MSI files. I was unable to use the copy file option from PsExec (-c) with MSI files so in the end I had to put the MSI file on a shared folder on the network. Since I was accessing the network I needed to specify the user for PsExec so I would have the proper network credentials. Here is how the command should look:

psexec \\TargetMachineName -u DomainName\UserName -p Password 
msiexec /i "\\SourceComputerName\SharedDrive\Setup.msi" /qn

When I tested a NSIS setup file it worked much easier as the copy file option worked fine.

psexec \\TargetMachineName -c NsisSetup.exe /S

Another nifty thing I discovered with PsExec was the ability to specify multiple computers to execute the command on. There are 3 different ways you can do this. "psexec \\* -c NsisSetup.exe /S" would execute on every machine in the domain. "psexec \\Machine1,Machine2 -c NsisSetup.exe /S" would execute on Machine1 and Machine2. "psexec @ComputerList.txt /S" would execute on every machine listed in the ComputerList.txt file.

I found a good article on Windows IT Pro which gave a good description of how PsExec works:
"PsExec starts an executable on a remote system and controls the input and output streams of the executable's process so that you can interact with the executable from the local system. PsExec does so by extracting from its executable image an embedded Windows service named Psexesvc and copying it to the Admin$ share of the remote system. PsExec then uses the Windows Service Control Manager API, which has a remote interface, to start the Psexesvc service on the remote system.

The Psexesvc service creates a named pipe, psexecsvc, to which PsExec connects and sends commands that tell the service on the remote system which executable to launch and which options you've specified. If you specify the -d (don't wait) switch, the service exits after starting the executable; otherwise, the service waits for the executable to terminate, then sends the exit code back to PsExec for it to print on the local console."

Some useful links: