Just for testing, try adding the command you want to execute to a (.bat) file. And then apllY: wsh.run(thefile.bat,1,true) and see what happens.
Or you try creating a VB.exe file and use command() to read from the input line. And the call Vb.exe using shell.run Another possiblity is that the wsh is not enabled on the machine you are using or not even installed or corrupted, to check for that you have to visit the registry and check. As I said before to make sure that the wsh is running try runnig the .vbs that includes WSH call directly in the command line and see. Moreover, I am sure that run function runs (.exe, .bat) but I am not sure about .vbs . It happened once that wsh did not work on my machine (win2000 professional) so all what I did is that I reinstalled internet explorer 6 again and it worked.(maybe it helps wsh comes by default with IE6 and above) For more information about WSH go to: http://msdn.microsoft.com/scripting http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script5 6/html/wstsksetupofremotewsh.asp nabil -----Original Message----- From: Remie Bolte [mailto:asplist@;vinrem.nl] Sent: Friday, October 25, 2002 1:03 PM To: ActiveServerPages Subject: Re: WSH Run Problem Hi ok, tried to run it in admin context, yet no luck. does anyone else have a clue? regards remie bolte ----- Original Message ----- From: "Ken Schaefer" <[EMAIL PROTECTED]> To: "ActiveServerPages" <[EMAIL PROTECTED]> Sent: Thursday, October 24, 2002 3:20 AM Subject: Re: WSH Run Problem > 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.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]
