Re: VBScript package
- From: "Steve Thompson" <stevethompson@xxxxxxxxxxxxx>
- Date: Wed, 8 Nov 2006 11:08:11 -0500
Tim,
I checked our script, I use the following syntax to invoke it:
wscript.exe ClearClientCache.vbs
Here is the script:
on error resume next
dim oUIResManager
dim oCache
dim oCacheElement
dim oCacheElements
set oUIResManager = createobject("UIResource.UIResourceMgr")
if oUIResManager is nothing then
wscript.quit(1)
end if
set oCache=oUIResManager.GetCacheInfo()
if oCache is nothing then
set oUIResManager=nothing
wscript.quit(2)
end if
set oCacheElements=oCache.GetCacheElements
for each oCacheElement in oCacheElements
oCache.DeleteCacheElement(oCacheElement.CacheElementID)
next
"Tim In Jax" <TimInJax@xxxxxxxxx> wrote in message
news:1162998312.250445.271550@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
What I put in the Program definition was:
CSCript.exe ClearCache.vbs
When the script executes on the clients the 10005 messages shows the
following:
Command line: "C:\WINNT\system32\cscript.exe" ClearCache.vbs
Working directory: C:\WINNT\system32\CCM\Cache\<Package Dir>\
User context: NT AUTHORITY\SYSTEM
I have run the program under the system Account manually and it works
correctly so I know the syntax of the script is correct but when it
runs unattended it nothing appears to run. I do however get a
successfully completed status message.
ISokkar wrote:
What is the command line you wrote in SMS Program ?
ISokkar
"TimInJax@xxxxxxxxx" wrote:
I have been using some frequently used vbscript to clear the cache of
our advanced clients:
on error resume next
dim oUIResManager
dim oCache
set oUIResManager = createobject("UIResource.UIResourceMgr")
if oUIResManager is nothing then
wscript.echo "Couldn't create Resource Manager - quitting"
end if
set oCache=oUIResManager.GetCacheInfo()
if oCache is nothing then
set oUIResManager=nothing
wscript.echo "Couldn't get cache info - quitting"
end if
wscript.echo "Cache Location: " & oCache.Location
set oUIResManager=nothing
set oCache=nothing
I created a package with the script and deployed it to a collection of
my clients, the advertisement is successfully run but the cache is
never deleted. Running the same command that is posted to the 10005
status message manually removes everything from the cache. Currently I
have the package set to run "Whether or not a user is logged on". Is
there a special consideration that I need to take into account for
vbscripts to run?
.
- Follow-Ups:
- Re: VBScript package
- From: Tim In Jax
- Re: VBScript package
- References:
- VBScript package
- From: TimInJax
- Re: VBScript package
- From: Tim In Jax
- VBScript package
- Prev by Date: Re: Notify Once Software Distribution Complete
- Next by Date: Re: VBScript package
- Previous by thread: Re: VBScript package
- Next by thread: Re: VBScript package
- Index(es):
Relevant Pages
|
Loading