fn launcher_install_dir() -> io::Result<PathBuf> {
	println!("Attempting to find Minecraft Launcher installation from registry");

	let launcher_install_location = RegKey::predef(winreg::enums::HKEY_CURRENT_USER)
		.open_subkey(r"SOFTWARE\Mojang\InstalledProducts\Minecraft Launcher")?
		.get_value::<OsString, &str>("InstallLocation")?;

	Ok(PathBuf::from(launcher_install_location))
}
/// Get the installation directory of the vanilla launcher.
/// Mojang conveniently adds a registry entry for us to find the install location.
Get the installation directory of the vanilla launcher.
Mojang conveniently adds a registry entry for us to find the install location.
Get the installation directory of the vanilla launcher . Mojang conveniently adds a registry entry for us to find the install location .
fn launcher_install_dir() -> io::Result<PathBuf> {
	println!("Attempting to find Minecraft Launcher installation from registry");
	let launcher_install_location = RegKey::predef(winreg::enums::HKEY_CURRENT_USER)
		.open_subkey(r"SOFTWARE\Mojang\InstalledProducts\Minecraft Launcher")?
		.get_value::<OsString, &str>("InstallLocation")?;
	Ok(PathBuf::from(launcher_install_location))
}
fn launcher_install_dir ( ) -> io :: Result < PathBuf > { println ! ( " " ) ; let launcher_install_location = RegKey :: predef ( winreg :: enums :: HKEY_CURRENT_USER ) . open_subkey ( r"SOFTWARE\Mojang\InstalledProducts\Minecraft Launcher" ) ? . get_value :: < OsString , & str > ( " " ) ? ; Ok ( PathBuf :: from ( launcher_install_location ) ) }
Get the installation directory of the vanilla launcher.
Get the installation directory of the vanilla launcher .