使用vbscript删除GAC程序集
如标题所示,如何使用vbscript删除GAC程序集文件?您可以运行此命令从GAC卸载它:使用vbscript删除GAC程序集,vbscript,assemblies,gac,Vbscript,Assemblies,Gac,如标题所示,如何使用vbscript删除GAC程序集文件?您可以运行此命令从GAC卸载它: gacutil /u YourAssembly 您可以运行此命令从GAC卸载它: gacutil /u YourAssembly 我记得gacutil在支持.NET的shell中 C:\>gacutil Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8 Copyright (c) Microsoft Co
gacutil /u YourAssembly
您可以运行此命令从GAC卸载它:
gacutil /u YourAssembly
我记得gacutil在支持.NET的shell中
C:\>gacutil
Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
Copyright (c) Microsoft Corporation. All rights reserved.
Usage: Gacutil <command> [ <options> ]
Commands:
/i <assembly_path> [ /r <...> ] [ /f ]
Installs an assembly to the global assembly cache.
/il <assembly_path_list_file> [ /r <...> ] [ /f ]
Installs one or more assemblies to the global assembly cache.
/u <assembly_display_name> [ /r <...> ]
Uninstalls an assembly from the global assembly cache.
/ul <assembly_display_name_list_file> [ /r <...> ]
Uninstalls one or more assemblies from the global assembly cache.
/l [ <assembly_name> ]
List the global assembly cache filtered by <assembly_name>
/lr [ <assembly_name> ]
List the global assembly cache with all traced references.
/cdl
Deletes the contents of the download cache
/ldl
Lists the contents of the download cache
/?
Displays a detailed help screen
Options:
/r <reference_scheme> <reference_id> <description>
Specifies a traced reference to install (/i, /il) or uninstall (/u, /ul).
/f
Forces reinstall of an assembly.
/nologo
Suppresses display of the logo banner
/silent
Suppresses display of all output
C:\>gacutil
Microsoft(R).NET全局程序集缓存实用程序。版本3.5.21022.8
版权所有(c)微软公司。版权所有。
用法:Gacutil[]
命令:
/i[/r][f]
将程序集安装到全局程序集缓存。
/[r][f]
将一个或多个程序集安装到全局程序集缓存。
/u[/r]
从全局程序集缓存卸载程序集。
/ul[/r]
从全局程序集缓存卸载一个或多个程序集。
/l[]
列出按筛选的全局程序集缓存
/lr[]
列出包含所有跟踪引用的全局程序集缓存。
/cdl
删除下载缓存的内容
/低密度脂蛋白
列出下载缓存的内容
/?
显示详细的帮助屏幕
选项:
/r
指定要安装(/i,/il)或卸载(/u,/ul)的跟踪引用。
/f
强制重新安装部件。
/诺洛戈
禁止显示徽标横幅
/沉默的
抑制所有输出的显示
我记得gacutil是一个支持.NET的shell
C:\>gacutil
Microsoft (R) .NET Global Assembly Cache Utility. Version 3.5.21022.8
Copyright (c) Microsoft Corporation. All rights reserved.
Usage: Gacutil <command> [ <options> ]
Commands:
/i <assembly_path> [ /r <...> ] [ /f ]
Installs an assembly to the global assembly cache.
/il <assembly_path_list_file> [ /r <...> ] [ /f ]
Installs one or more assemblies to the global assembly cache.
/u <assembly_display_name> [ /r <...> ]
Uninstalls an assembly from the global assembly cache.
/ul <assembly_display_name_list_file> [ /r <...> ]
Uninstalls one or more assemblies from the global assembly cache.
/l [ <assembly_name> ]
List the global assembly cache filtered by <assembly_name>
/lr [ <assembly_name> ]
List the global assembly cache with all traced references.
/cdl
Deletes the contents of the download cache
/ldl
Lists the contents of the download cache
/?
Displays a detailed help screen
Options:
/r <reference_scheme> <reference_id> <description>
Specifies a traced reference to install (/i, /il) or uninstall (/u, /ul).
/f
Forces reinstall of an assembly.
/nologo
Suppresses display of the logo banner
/silent
Suppresses display of all output
C:\>gacutil
Microsoft(R).NET全局程序集缓存实用程序。版本3.5.21022.8
版权所有(c)微软公司。版权所有。
用法:Gacutil[]
命令:
/i[/r][f]
将程序集安装到全局程序集缓存。
/[r][f]
将一个或多个程序集安装到全局程序集缓存。
/u[/r]
从全局程序集缓存卸载程序集。
/ul[/r]
从全局程序集缓存卸载一个或多个程序集。
/l[]
列出按筛选的全局程序集缓存
/lr[]
列出包含所有跟踪引用的全局程序集缓存。
/cdl
删除下载缓存的内容
/低密度脂蛋白
列出下载缓存的内容
/?
显示详细的帮助屏幕
选项:
/r
指定要安装(/i,/il)或卸载(/u,/ul)的跟踪引用。
/f
强制重新安装部件。
/诺洛戈
禁止显示徽标横幅
/沉默的
抑制所有输出的显示
您可以将WSH与VBScript一起使用,并使用WSH打开文件
您可以将WSH与VBScript一起使用,并使用WSH打开文件
以下是如何从VBScript调用
gacutil
工具:
Const GACUTILPATH = "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\gacutil.exe"
strAssembly = "MyAssembly" '' or "MyAssembly,Version=1.1.0.0,Culture=en,PublicKeyToken=874e23ab874e23ab"
Set oShell = CreateObject("WScript.Shell")
oShell.Run """" & GACUTILPATH & """ /nologo /u " & strAssembly
以下是如何从VBScript调用
gacutil
工具:
Const GACUTILPATH = "C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\gacutil.exe"
strAssembly = "MyAssembly" '' or "MyAssembly,Version=1.1.0.0,Culture=en,PublicKeyToken=874e23ab874e23ab"
Set oShell = CreateObject("WScript.Shell")
oShell.Run """" & GACUTILPATH & """ /nologo /u " & strAssembly