试试
If Syscmd.Project.Update(False,False) = False Then '如果没有升级
''其他代码
Else
Application.restart
End If