View Single Post
  #5  
Old October 29th 11, 06:58 AM
Quinton1 Quinton1 is offline
Junior Member
 
First recorded activity at Outlookbanter: Oct 2011
Posts: 4
Default

Quote:
Originally Posted by Ken Slovak - [MVP - Outlook] View Post
%windir% is an environment variable that refers to C:\Winnt or C:\Windows
(depending on OS).

A script blocker would block that from running, script blockers don't like
CreateObject. Other than that if you have user permissions on wherever
you're writing to you should be OK.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Culverin" wrote in message
...
Thanks Ken.

This worked for me(the server-name is first):

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run
"\\sh19p001\wrkbench\Other_Projects\NASA\Clear_Cac he\Clear_cache.vbs"

I just need to test to see if this works for our users. Granting
permissions to "Everyone" to the Clear_Cache directory should be all I
need
to do to ensure that
this will work for all of our users across the country.

What is "%windir%"?
I've been trying to invoke Robert Sparnaaij's clear cache VB Script from VB
Script code on a custom Appointment Item from using the "Shell" method. I've
been getting "Type mismatch" runtime errors on "Shell"; indicating that it
appears that VB Script thinks that "Shell" is a variable and not a method.

Is the "Shell" method available in VB Script? If so, how do I get it to
work? If not, is there any other method I can use in VB Script to execute a
.VBS saved in a network drive. The path I want to use is
"\\servername\foldername\foldername\Clear_cache.vb s"

Thanks for your help.
Ads