如标题所说,如何使用 vbscript 删除 GAC 程序集文件?
John
问问题
2105 次
4 回答
1
您可以运行它从 GAC 中卸载它:
gacutil /u YourAssembly
于 2008-11-13T13:27:27.637 回答
0
我记得 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
于 2008-11-13T13:29:20.253 回答
0
您可以将 WSH 与 VBScript 一起使用,并使用 WSH 打开文件。
于 2008-11-13T13:56:14.037 回答
0
gacutil
以下是从 VBScript调用该工具的方法:
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
于 2009-07-16T09:20:23.387 回答