My attempts to create a quick way to access google search have met with failure. It seems that using a simple Batch script is insufficient to handle 'special' characters like the pipe '|' or arrows '>' & '<'. These are generally something a geek coder may need to search for. I got off my lazy butt and coded a quick console app in C#.
Complile, copy to your %userprofile% folder, and enjoy.
USAGE ~ [WINKEY + R] -> gs <word1> <word2> <wordn>
GS.cs
namespace genericsearch
{
class gs
{
static void Main(string[] args)
{
if(args.Length == 0) {
System.Console.Error.Write("Use: gs.exe <word.1> <word.2> <word.n>\nPress any key to quit");
System.Console.Read();
return;
}
string query = "";
foreach (string s in args) {query += s + "+";}
query = query.Remove(query.Length-1,1);
string queryURL = System.Configuration.ConfigurationSettings.AppSettings["searchURL"];
string process = queryURL + query;
System.Diagnostics.Process.Start(process);
}
}
}
app.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="searchURL" value="http://www.google.com/search?q=" />
</appSettings>
</configuration>