public void runInstaller(String installer) {
		ProcessBuilder builder = new ProcessBuilder(installer, "/S");
		try {
			//for Windows XP:
			builder.start().waitFor();
		} catch (Exception e) {
			try {
				//for Windows 8:
				if (System.getProperty("os.version").equals("6.2"))
				{

					File file = new File(installer);
					File batch = new File(file.getParent(), "install.bat");
					FileWriter outFile = new FileWriter(batch);
					PrintWriter out = new PrintWriter(outFile);
					out.append("reg.exe Add \"HKCU\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers\" /v \"" + installer + "\" /d \"WIN7RTM ELEVATECREATEPROCESS RUNASADMIN DISABLENXSHOWUI\"\r\n");
					out.append(installer + " /S");
					out.close();
					outFile.close();
					ProcessBuilder builder2 = new ProcessBuilder(batch.getAbsolutePath());
					try {
						builder2.start().waitFor();
					} catch (Exception ex)
					{
						ex.printStackTrace();
					}
					//Elevator.executeAsAdministrator(batch.getAbsolutePath(), "");
				} else
				{
					//for Windows 7:
				//	Elevator.executeAsAdministrator(installer, "/S");
					//WIN7RTM 
					File file = new File(installer);
					File batch = new File(file.getParent(), "install.bat");
					FileWriter outFile = new FileWriter(batch);
					PrintWriter out = new PrintWriter(outFile);
					out.append("reg.exe Add \"HKCU\\Software\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Layers\" /v \"" + installer + "\" /d \"WIN7RTM ELEVATECREATEPROCESS RUNASADMIN DISABLENXSHOWUI\"\r\n");
					out.append(installer + " /S");
					out.close();
					outFile.close();
					ProcessBuilder builder2 = new ProcessBuilder(batch.getAbsolutePath());
					try {
						builder2.start().waitFor();
					} catch (Exception ex)
					{
						ex.printStackTrace();
					}
				}
			} catch (Exception ex)
			{
				ex.printStackTrace();
				String text = "Please install Dokan from " + installer;
				switch (usemode)
				{
					case GUI:
						JOptionPane.showMessageDialog(null, text);
						break;
					case CONSOLE:
						System.out.println(text);
						break;
					default:
						break;
				}
			}
		}
	}