通过 (1)-(3) 设置,Terminal Users 桌面就变成了一片空白,很多功能组件如我的电脑、控制面板等不仅不能进入,而且连图标也找不到了。
使用以下启动脚本,以强化 Terminal Users 桌面:
1)当用户在客户端登录时,会自动打开一个 IE 程序,IE 程序默认主页是 TS WEB ACCESS 网页;
2)用户在网页上出现指定的程序,客户直接使用就行了;
3)如果用户把 IE 关了,系统会自动打开一个新的 IE 程序。
=======================================================================
LogonIE.vbs
=======================================================================
On Error Resume Next
Set WshShell = WScript.CreateObject ("WScript.Shell")
'Get the username and profile directory
MUser = WshShell.ExpandEnvironmentStrings ("%USERNAME%")
'Run the app
Itrue = True
Do until Itrue = false
wshShell.Run "iexplore.exe"
' Connect to wmi
set objWMIService = GetObject("winmgmts:root\cimv2")
Do
found = false
' List the processes
strQuery = "Select * from win32_process where name='iexplore.exe'"
set colProcesses = objWMIService.ExecQuery(strQuery)
for each proc in colProcesses
' Get the reference class linking processes to sessions to get the session object path
strQuery = "References of {win32_process.handle='" & proc.handle & "'} where ResultClass=Win32_SessionProcess"
set colSessionReferences = objWMIService.ExecQuery(strQuery)
for each oSessionReference in colSessionReferences
'Get associators of the session object that are user accounts (linked by win32_loggedonuser)
strQuery = "Associators of {" & oSessionReference.antecedent & "} where AssocClass=win32_LoggedOnUser"
set colUsers = objWMIService.ExecQuery(strQuery,,48)
for each user in colUsers
if user.name = MUser then found = true
Itrue = True
next
next
next
Loop While found = true
Loop
=======================================================================