Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Web Design, HTML And CSS Forums (http://www.go4expert.com/forums/web-design-forum/)
-   -   PLEASE HELP ---> My folder permissions vbs is not working (http://www.go4expert.com/forums/help-folder-permissions-vbs-t12726/)

case2k8 5Aug2008 23:13

PLEASE HELP ---> My folder permissions vbs is not working
 
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("%AllUs ersProfile%")

path= oFSO.GetParentFolderName(WScript.ScriptFullName)

objShell.Run path+"\Toad_Standalone\9_6_1_1\ToadforOracle961Set upFull.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.k ey", "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

shabbir 6Aug2008 09:23

Re: PLEASE HELP ---> My folder permissions vbs is not working
 
Duplicate of PLEASE HELP ---> My folder permissions vbs is not working. Thread closed.


All times are GMT +5.5. The time now is 05:58.