code: def enable_symlink_privilege():
  	
  	# create a space in memory for a TOKEN_PRIVILEGES structure
  	#  with one element
  	size = ctypes.sizeof(privilege.TOKEN_PRIVILEGES)
  	size += ctypes.sizeof(privilege.LUID_AND_ATTRIBUTES)
  	buffer = ctypes.create_string_buffer(size)
  	tp = ctypes.cast(buffer, ctypes.POINTER(privilege.TOKEN_PRIVILEGES)).contents
  	tp.count = 1
  	tp.get_array()[0].enable()
  	tp.get_array()[0].LUID = get_symlink_luid()
  	token = get_process_token()
  	res = privilege.AdjustTokenPrivileges(token, False, tp, 0, None, None)
  	if res == 0:
  		raise RuntimeError("Error in AdjustTokenPrivileges")
  
  	ERROR_NOT_ALL_ASSIGNED = 1300
  	return ctypes.windll.kernel32.GetLastError() != ERROR_NOT_ALL_ASSIGNED
docs: Try to assign the symlink privilege to the current process token.
  	Return True if the assignment is successful.