PLEASE HELP ---> My folder permissions vbs is not working

Discussion in 'Web Design, HTML And CSS' started by case2k8, Aug 5, 2008.

Thread Status:
Not open for further replies.
  1. case2k8

    case2k8 New Member

    Joined:
    Aug 5, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Here is the script that needs an expert to look at:

    Note: The only thing working on this script is a successful installation of TOAD. The permissions section and the copy file section is not working. Can you help?

    On Error Resume NExt
    Dim objShell, objNewPort, objWMIService, oFSO, Path, strComputerA
    Dim RunErrorToReturn, Results
    Dim strComputer : strComputer = "."
    Dim objNetwork : Set objNetwork = CreateObject("WScript.Network")
    strComputerA = objNetwork.ComputerName

    Set objWMIService = GetObject("winmgmts:"& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    Set objShell = CreateObject("WScript.Shell")
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    ProgramFiles = objShell.ExpandEnvironmentStrings("%ProgramFiles%")
    windir= objShell.ExpandEnvironmentStrings("%windir%")
    temp = objShell.ExpandEnvironmentStrings("%temp%")
    allusers=objShell.ExpandEnvironmentStrings("%AllUsersProfile%")

    path= oFSO.GetParentFolderName(WScript.ScriptFullName)

    objShell.Run path+"\Toad_Standalone\9_6_1_1\ToadforOracle961SetupFull.msi /qb ALLUSERS=1 ADDLOCAL=Server,Client",1,TRUE

    objShell.Run """" & path & "\Setacl.exe"" -on """ & ProgramFiles & "\Quests~1"" -ot file -actn ace -ace ""n:S-1-5-11;p:full;s:y"" -actn clear -clr ""dacl,sacl"" -actn rstchldrn -rst ""dacl,sacl"" -silent",1,TRUE

    Set fso=CreateObject("Scripting.FileSystemObject")
    fso.CopyFile "\\server\esl$\Oracle\Toad\9.6.1\Client\QSAuth11.key", "C:\Program Files\Quest Software\Toad for Oracle\", 0, TRUE


    'If there was an error return it otherwise return 0 with a success;
    If Err.Number<>0 Then
    RunErrorToReturn = Err.Number
    Results = src1(1) & vbstatus & ", exiting."
    SMSWriteStatusMIF "if then", "TOAD961", "1", Results, src2(1)
    wscript.quit(RunErrorToReturn)
    Else
    RunErrorToReturn = 0
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice