Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
VBScript以英语版本工作,但不以法语版本工作_Vbscript - Fatal编程技术网

VBScript以英语版本工作,但不以法语版本工作

VBScript以英语版本工作,但不以法语版本工作,vbscript,Vbscript,我有以下脚本在任务栏中添加快捷方式。它在英文版中工作得很好,但在法文版Windows7中失败 on error resume next Const CSIDL_COMMON_PROGRAMS = &H17 Const CSIDL_PROGRAMS = &H2 Const CSIDL_STARTMENU = &HB Set objShell = CreateObject("Shell.Application") Set objFSO = CreateObject("S

我有以下脚本在任务栏中添加快捷方式。它在英文版中工作得很好,但在法文版Windows7中失败

on error resume next

Const CSIDL_COMMON_PROGRAMS = &H17
Const CSIDL_PROGRAMS = &H2
Const CSIDL_STARTMENU = &HB


Set objShell = CreateObject("Shell.Application")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objCurrentUserStartFolder = objShell.NameSpace (CSIDL_STARTMENU)
strCurrentUserStartFolderPath = objCurrentUserStartFolder.Self.Path
Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path

' - Pin to Taskbar -

If objFSO.FileExists(strAllUsersProgramsPath & "\TN3270 Plus\TN3270 Central.lnk") Then             'path of the shortcut in start menu
Set objFolder = objShell.Namespace(strAllUsersProgramsPath &"\TN3270 Plus")                   'name of the folder in which the shortcut is placed in start menu
Set objFolderItem = objFolder.ParseName("TN3270 Central.lnk")                           'Short cut name
Set colVerbs = objFolderItem.Verbs
For Each objVerb in colVerbs
If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt

Next
End If

有人能帮我看看吗。

请具体说明失败的原因。如果在错误转到0时使用
,则会显示一些错误消息?并尝试显示所有可以本地化的
objVerb.name
?查看此混合代码(Vbscript/PowerShell):请指定失败的原因。如果在错误转到0时使用
,则会显示一些错误消息?并尝试显示所有可以本地化的
objVerb.name
?看看这个混合代码(Vbscript/PowerShell):