I know you guys are too good at scripting. But for the newbies that are trying to learn something. Just in case, if they need something like this. This might be of little help.

VB Script to Change the permissions of a folder, copy contents of a folder and rename the folder

Dim objFSO

Dim objShell

Dim strSysDir

Dim Calcds

Dim FoldPerm


Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objShell = CreateObject("WScript.Shell")



strSysDir = objFSO.GetSpecialFolder(1).Path

If Right(strSysDir,1) <> "\" Then strSysDir = strSysDir & "\"

Calcds = sSysDir & "cacls.exe"


FoldPerm = """" & Calcds &"""" & """c:\Program Files\Java\jre7""" & "  /t /e /c /p " & """Users""" & ":F"

objShell.Run FoldPerm, 1, True



If objFSO.FolderExists("C:\windows\sun\java\deployment\Lib\Trusted") Then


objFSO.CopyFolder "C:\windows\sun\java\deployment\Lib\Trusted", "C:\Program Files\Java\jre7\Lib\Ext", True

End If



If objFSO.FolderExists("C:\windows\sun\java\deployment\Lib\Trusted") Then


objFSO.MoveFolder "C:\windows\sun\java\deployment\Lib\Trusted", "C:\windows\sun\java\deployment\Lib\Trusted1"  


End If








1 Comment   [ - ] Hide Comment


  • I would suggest posting this in the Blog area rather than the Q&A. Thanks!
Please log in to comment

There are no answers at this time
Answer this question or Comment on this question for clarity