First question I asked in my previous email:
Different user context?
(when you double-click a .vbs file it will run in the context of the logged
on user. If you do it in an ASP page, without using authentication, it will
run in the context of the anonymous internet account, which probably doesn't
have permissions to make the necessary changes. Run the ASP page in the
context of an administrator account by denying anonymous access to the page)
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Remie Bolte" <[EMAIL PROTECTED]>
Subject: Re: WSH Run Problem
: Ok
:
: I had to ask the code so it took me a while.
:
: <%
: Dim caclscommand
: Dim wsh
: Dim wshRun
: memberName = "pmoss"
: Caclscommand = "cmd /c echo y| CACLS " & "\\dc1\home\" & userName '****
the
: code fails whether userName is dynamically assigned or static
:
:
'***************************************************************************
: *******************
: '* Deletes the existing inherited permissions and adds the student's
: permissions *
:
'***************************************************************************
: *******************
: Caclscommand1 = Caclscommand & " /E /C /G " & memberName & ":" & "C"
:
: Set wsh = server.createobject("WScript.Shell")
: wsh.Run(Caclscommand1, 1, True)
:
: Set wsh = nothing
: %>
:
: this code doesn't run in ASP, but it does run in .vbs mode.
: can it have anything to do with IIS settings?
:
: regards
:
: remie bolte
:
:
:
:
: ----- Original Message -----
: From: "Ken Schaefer" <[EMAIL PROTECTED]>
: To: "ActiveServerPages" <[EMAIL PROTECTED]>
: Sent: Wednesday, October 23, 2002 9:35 AM
: Subject: Re: WSH Run Problem
:
:
: > Different user context?
: >
: > Otherwise, can you please provide code?
: >
: > Cheers
: > Ken
: >
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: > From: "Remie Bolte" <[EMAIL PROTECTED]>
: > Subject: WSH Run Problem
: >
: >
: > : i have received a question concerning WSH
: > : it's about setting folder permissions using CACLS.
: > :
: > : it seems that the WSH run method works using .vbs files but doesn't
work
: > : using .ASP files. At least at his computer, because it works fine for
: me.
: > :
: > : does anyone know what to do in order to make WSH work server-side
trough
: > : ASP?
: >
: > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: >
: > ---
: > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
: > To unsubscribe send a blank email to
: %%email.unsub%%
:
:
:
: ---
: You are currently subscribed to activeserverpages as: [EMAIL PROTECTED]
: To unsubscribe send a blank email to
%%email.unsub%%
---
You are currently subscribed to activeserverpages as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]