您知道在脚本中打开 AD 连接 3 次是否有任何问题?我正在为主要由 VBScript 组成的用户终端构建一个 HTA 应用程序:
Sub Confirmation
-> connect to AD
-> check if user exists
-> end AD connection - objConnection.Close
-> ask user for confirmation to call Phase1 / Phase 2, else exit sub
Sub Phase1
-> connect to AD
-> perform actions
-> objConnection.Close
Sub Phase2
-> connect to AD
-> perform actions
-> objConnection.Close
问题是,如果我没有在 Sub Confirmation 中关闭它,连接是否通过 Sub Phase1 和 Sub Phase2 保持活动状态?