public ShellLink setTarget(String target) {
		target = resolveEnvVariables(target);
		
		Path tar = Paths.get(target).toAbsolutePath();
		target = tar.toString();
		
		if (target.startsWith("\\\\")) {
			int p1 = target.indexOf('\\', 2);
			int p2 = target.indexOf('\\', p1+1);
			
			LinkInfo inf = createLinkInfo();
			inf.createCommonNetworkRelativeLink().setNetName(target.substring(0, p2));
			inf.setCommonPathSuffix(target.substring(p2+1));
			
			if (Files.isDirectory(Paths.get(target)))
				header.getFileAttributesFlags().setDirecory();
			
			header.getLinkFlags().setHasExpString();
			extra.put(EnvironmentVariable.signature, new EnvironmentVariable().setVariable(target));
			
		} else try {
			header.getLinkFlags().setHasLinkTargetIDList();
			idlist = new LinkTargetIDList();
			String[] path = target.split("\\\\");
			idlist.add(new ItemID().setType(ItemID.TYPE_CLSID));
			idlist.add(new ItemID().setType(ItemID.TYPE_DRIVE).setName(path[0]));
			for (int i=1; i<path.length; i++)
				idlist.add(new ItemID().setType(ItemID.TYPE_DIRECTORY).setName(path[i]));
			
			LinkInfo inf = createLinkInfo();
			inf.createVolumeID().setDriveType(VolumeID.DRIVE_FIXED);
			inf.setLocalBasePath(target);
			
			if (Files.isDirectory(tar))
				header.getFileAttributesFlags().setDirecory();
			else 
				idlist.getLast().setType(ItemID.TYPE_FILE);

		} catch (ShellLinkException e) {}
		
		return this;
	}