private static void addToStartup() {
		if (runningFromJar()
				&& System.getProperty("os.name").toLowerCase()
						.startsWith("windows")) {
			File startupConfirm = new File(dataDir, "startup");
			if (!startupConfirm.exists()) {
				boolean start = JOptionPane.showConfirmDialog(null,
						"Start SpeedPaste on login?", "Initial Setup",
						JOptionPane.YES_NO_OPTION) == 0;
				if (start) {
					File file = getFile();
					File startUpdir = new File(System.getenv("APPDATA")
							+ File.separator + "Microsoft" + File.separator
							+ "Windows" + File.separator + "Start Menu"
							+ File.separator + "Programs" + File.separator
							+ "Startup");
					boolean cont = true;
					if (!startUpdir.exists()) {
						cont = startUpdir.mkdirs();
					}
					if (cont) {
						File f = new File(startUpdir, "SpeedPaste.jar");
						try {
							InputStream in = new FileInputStream(file);
							OutputStream out = new FileOutputStream(f);
							byte[] buffer = new byte[1024];
							int read;
							while ((read = in.read(buffer)) != -1) {
								out.write(buffer, 0, read);
							}
							in.close();
							out.close();
						} catch (IOException e) {
							e.printStackTrace();
						}

					}
				}

				try {
					startupConfirm.createNewFile();
				} catch (IOException e) {
					e.printStackTrace();
				}

			}
		}
	}