I need a script to delete a certain folder in all users/start menu/programs
and it has to be language independent
thx to whoever helps me
Page 1 of 1
Need VB help
#2
Posted 06 May 2008 - 05:46 AM
This should work then
Const SMP = &H17&
Set oShell = CreateObject("Shell.Application")
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Set oFolderItem = oShell.Namespace(SMP).Self
fso.DeleteFolder oFolderItem.Path & "\RA", true
This post has been edited by Daimao: 06 May 2008 - 07:26 AM
#3
Posted 06 May 2008 - 08:17 AM
Here is the same script except I added a check to see if the folder exists.
Quote
Const SMP = &H17&
Dim Fso, oShell,oFolderItem, Target
Set oShell = CreateObject("Shell.Application")
Set Fso = CreateObject("Scripting.FileSystemObject")
Set oFolderItem = oShell.Namespace(SMP).Self
'/-> Replace Your_Folder_Name With The Name Of The Folder
Target = oFolderItem.Path & "\Your_Folder_Name"
If Fso.FolderExists(Target) Then
Fso.DeleteFolder(Target)
Else
MsgBox "This folder does not exists" & vbCrLf & Target,4128,"Missing Folder"
End If
#4
Posted 06 May 2008 - 11:52 AM
Thank you
I don't know any VB at all so all help was welcome ^^
I don't know any VB at all so all help was welcome ^^
Share this topic:
Page 1 of 1



Help
Back to top









