M
Mike
Hi -
I am trying to get this piece of script to work without any success. I am
running this on W2K w/SP4 and IIS 5.0. I am using Windows Integrated
Authentication and logging on as a Domain Admin.
' Create File System Object
Set objFiles = Server.CreateObject("Scripting.FileSystemObject")
' Check for duplicate folder name
If objFiles.FolderExists(strHomeDirectory)
Then WScript.Echo "A home folder " & strHomeDirectory & " already exists. A
new home folder will need to be created manually."
Else
'Create the User HomeDirectory - This works!
objFiles.CreateFolder(strHomeDirectory)
ChangeFolderSettings("AUserFolder")
Sub ChangeFolderSettings(strLoginID)
Dim cmdCacls
Dim objWsShell
Dim objWsRun
cmdCacls = "cmd /c echo y| CACLS.EXE \\" & strServer & "\" &
strStudentGradYear & "\" & strInit & "\" & strLoginID & " /e /g " &
strLoginID & ":C"
Set objWsShell = Server.CreateObject("WScript.Shell")
' IIS does not like this
Set objWsRun = objWsShell.run(cmdCacls, 0, True)
Set objWsShell = nothing
Set objWsRun = nothing
End Sub
End If
At the Set objWsRun = objWsShell.run(cmdCacls, 0, True) line IIS returns an
error stating:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'objWsShell.run(...)'
The folder does get created sucessfully.
Any help on this or other methods of setting folder permissions within an
ASP page would be greatly appreciated.
Thanks!!!
Mike
I am trying to get this piece of script to work without any success. I am
running this on W2K w/SP4 and IIS 5.0. I am using Windows Integrated
Authentication and logging on as a Domain Admin.
' Create File System Object
Set objFiles = Server.CreateObject("Scripting.FileSystemObject")
' Check for duplicate folder name
If objFiles.FolderExists(strHomeDirectory)
Then WScript.Echo "A home folder " & strHomeDirectory & " already exists. A
new home folder will need to be created manually."
Else
'Create the User HomeDirectory - This works!
objFiles.CreateFolder(strHomeDirectory)
ChangeFolderSettings("AUserFolder")
Sub ChangeFolderSettings(strLoginID)
Dim cmdCacls
Dim objWsShell
Dim objWsRun
cmdCacls = "cmd /c echo y| CACLS.EXE \\" & strServer & "\" &
strStudentGradYear & "\" & strInit & "\" & strLoginID & " /e /g " &
strLoginID & ":C"
Set objWsShell = Server.CreateObject("WScript.Shell")
' IIS does not like this
Set objWsRun = objWsShell.run(cmdCacls, 0, True)
Set objWsShell = nothing
Set objWsRun = nothing
End Sub
End If
At the Set objWsRun = objWsShell.run(cmdCacls, 0, True) line IIS returns an
error stating:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'objWsShell.run(...)'
The folder does get created sucessfully.
Any help on this or other methods of setting folder permissions within an
ASP page would be greatly appreciated.
Thanks!!!
Mike