![]() | Register | FAQ | Members | Social Groups | User Map | Calendar | Search | Today's Posts | Mark Forums Read |
| Scripts If you need or have any scripts then get 'em here. |
| ||
| | | LinkBack | Thread Tools | Search Thread |
| Sponsored Links |
| | #1 |
![]() Join Date: Feb 2008 Location: N wales
Posts: 20
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0 ![]() | I have set the following VBS script to run when our computers start up along with delprof.exe to get rid of any locally cached profiles. Code: Const LocalDocumentsFolder = "C:\Documents and Settings\"
set objFSO = createobject("Scripting.FileSystemObject")
set objFolder = objFSO.GetFolder(localdocumentsfolder)
for each fldr in objFolder.SubFolders
if not isexception(fldr.name) then
objFSO.DeleteFolder fldr.path, True
end if
next
Function isException(byval foldername)
select case foldername
case "All Users"
isException = True
case "Default User"
isException = True
case "LocalService"
isException = True
case "NetworkService"
isException = True
case "Administrator"
isException = True
case Else
isException = False
End Select
End Function
????: EduGeek.net Forums http://www.edugeek.net/forums/scripts/17425-vbscript-scripting-filesystemobject.html activex component can't create object:'Scripting.filesystemobject' in line 3 char1 Anyone have any ideas at a total loss here! |
| |
| | #3 |
![]() Join Date: Jan 2007 Location: Enfield, London
Posts: 153
Thanks: 6
Thanked 2 Times in 2 Posts
Rep Power: 7 ![]() | Are you using seperate copies on each machine of the same script. You may need to check how exactly you spelt Scripting.FileSystemObject. The only may I could get the same error was to mistype the name of the object between the quote marks. |
| |
| | #4 |
![]() Join Date: Feb 2008 Location: N wales
Posts: 20
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0 ![]() | Thanks for the help Binky and m2d2! A reinstall of the Scripting Host fixed it Regards Gareth |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| VBScript IDE + Debugger | Geoff | Scripts | 4 | 13-09-2007 08:56 PM |
| VBScript / SQL Server | Gatt | Scripts | 5 | 23-05-2007 02:12 PM |
| another VBScript question! | StewartKnight | Coding | 4 | 03-05-2007 05:41 PM |
| FileSystemObject Folder why permission denied | NetworkGeezer | Coding | 15 | 03-05-2007 05:34 PM |
| VBScript | StewartKnight | Coding | 5 | 01-05-2007 11:04 AM |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search Thread |
| |







