刷新桌面和任务栏中的所有图标

时间:2015-10-23 16:28:05

标签: vbscript

我需要使用批处理文件或VBScript以编程方式刷新桌面和任务栏图标。

我发现这个vbs击中了通常的刷新键, F5

Set WSHShell = CreateObject("WScript.Shell")
WshShell.SendKeys "{F5}"

但这显然不会刷新我提到的图标。

1 个答案:

答案 0 :(得分:1)

尝试通过以下方式终止并运行来刷新 Explorer.exe

class AppUser(UserMixin, Base):
  __tablename__ = 'app_users'

  username = db.Column(db.String(128), nullable=False, unique=True)
  firstname = db.Column(db.String(128))
  lastname = db.Column(db.String(128))
  email = db.Column(db.String(128), nullable=False)
  phone = db.Column(db.VARCHAR(12))
  company = db.Column(db.String(32))
  password_hash = db.Column(db.String(255), nullable=False)

  # When I kill these two lines I do not get the error.
  #time_zone_id = db.Column(db.Integer, db.ForeignKey('time_zones.id', ondelete='cascade'))
  #time_zone = db.relationship('TimeZone', backref='app_users', order_by=id)

  def __init__(self, username, email, password, firstname, lastname, company, phone):
    self.username = username.lower()
    self.email = email.lower()
    self.firstname = firstname.title()
    self.lastname = lastname.title()
    self.company = company
    self.phone = phone
    #self.time_zone_id = time_zone_id
    self.set_password(password)


  def set_password(self, password):
    self.password_hash = generate_password_hash(password)

  def verify_password(self, password):
    return check_password_hash(self.password_hash, password)

  def __repr__(self):
        return '<User %r>' % self.username