print "Grimoire 1.2 3/25/2007"

grimregpath = "Software\\Grimoire\\"

key = "Software\\Blizzard Entertainment\\Warcraft III"
val = "InstallPath"
path = grim.getregpair(key,val)
--path = "C:\\Warcraft III"
--setregdword(key,"hello",0xdeadbeef)
--getregpair(key,"hello")

if path == 0 then
	val = "InstallPathX"
	path = grim.getregpair(key,val)
end
if path == 0 then
	key = grimregpath
	val = "War3InstallPath"
	path = grim.getregpair(key,val)
end
if path == 0 then
	path = grim.browse("Select Directory Warcraft is Installed to\n")
	setregstring(grimregpath,"War3InstallPath",path)
end
