From 9c1d69378f213d90b6f8b0ae79f13ee4d159a915 Mon Sep 17 00:00:00 2001
From: Junaid Ali <alisyed8@iit.edu>
Date: Mon, 9 Jun 2014 15:36:58 -0500
Subject: [PATCH] Use cygwin PATH to resolve failed lookup of msg exe on 64-Bit
 OS

---
 lib/VCL/utils.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/VCL/utils.pm b/lib/VCL/utils.pm
index fbb7faf..4424fab 100644
--- a/lib/VCL/utils.pm
+++ b/lib/VCL/utils.pm
@@ -2765,7 +2765,7 @@ sub notify_via_msg {
 
 	my $osname = lc($^O);
 	if ($osname =~ /win/i) {
-		notify($ERRORS{'OK'}, 0, "notifying from Windows not yet supported\n-----\nTo: $user\nNode: $node\n$message\n-----");
+		notify($ERRORS{'OK'}, 0, "notifying using msg from non-Windows OS is not yet supported\n-----\nTo: $user\nNode: $node\n$message\n-----");
 		return;
 	}
 	notify($ERRORS{'WARNING'}, 0, "node is not defined")    if (!(defined($node)));
@@ -2777,7 +2777,7 @@ sub notify_via_msg {
 	$message =~ s/\'/\\\\\\\'/gs;
 	notify($ERRORS{'DEBUG'}, 0, "message:\n$message");
 
-	my $command = "msg $user /TIME:180 '$message'";
+	my $command = "export PATH=/cygdrive/c/Windows/Sysnative:\$PATH; msg $user /TIME:180 '$message'";
 	
 	my $identity_keys = get_management_node_info()->{keys};
 	if (run_ssh_command($node, $identity_keys, $command)) {
-- 
1.8.2.1

