Re: Problems running remote batch copy from wshshell asp script
From: Baruch Mettler (baruch_at_mettlers.net)
Date: 09/17/04
- Next message: Fabio: "Running scripts under administrator authority"
- Previous message: Tom Lavedas: "Re: WScript Sleep in HTML"
- In reply to: name: "Re: Problems running remote batch copy from wshshell asp script"
- Messages sorted by: [ date ] [ thread ]
Date: 17 Sep 2004 09:27:58 -0700
I asked the military, they said I needed to sign something and give
them 4+ years to help me :)
I apologise if my post was off topic. For the life of me I could not
figure out why WScript.Shell running under IIS would behave any
differently than opening a command line and executing a program by
hand. It seems in this case the anonymous user account was not used.
Instead the wshshell.run is ran under the local system account.
After some digging I found others with the same problem in this group
(maybe not all that off topic after all?)
And finally this one inspired the hack to get my script working. I
just used the "NET USE" command to attach to the server i need in my
batch file.
Thanks anyway for looking at it.
-Baruch
"name" <nospam@user.com> wrote in message
news:<eXKo7P7mEHA.2096@TK2MSFTNGP15.phx.gbl>...
> "batch"
> "wshshell "
> "component "
> "ASP "
>
> -----------
>
> Nobody here will translate to first line prerogative.
> As it is totally non GUI in essence.
>
> -------------
>
> I see your three lines of code and
>
> some documented switches thrown in.
>
> ----------------------
>
> Try the military.
>
> Subscribers can choose when they volunteer.
>
>
>
>
>
>
>
>
> "Baruch Mettler" <baruch@mettlers.net> wrote in message
> news:bc74623a.0409150802.2e77191d@posting.google.com...
> > I am trying to make a web interface that users can use to push data
> > from an internal development server a external server. I have been
> > trying to use the wshshell component to kick off a batch script that I
> > have been using successfully by hand. The problem is the batch script
> > runs fine when executed by hand. But when executed in the ASP page
> > only the copy fails, any other command in the file work. After further
> > testing I've noticed local server copies work, but when copying over
> > network shares it fails.
> >
> > Here is my code:
> >
> > push.asp
> > -----------------------
> > Set WshShell = Server.CreateObject("WScript.Shell")
> > wshshell.CurrentDirectory = "q:\ds\wwwroot\push\sitecopy\"
> > WshShell.run "testcopy.bat"
> >
> >
> > testcopy.bat
> > -----------------------
> > :
> > :
> mkdir test5 <--- Works
> > :
> > robocopy.exe \\remotesite1\c$\test\ \\remotesite2\c$\test\ <-- Does
> > not work
> > robocopy.exe c:\test\ c:\test\ <--- Works
> > :
> > xcopy \\remotesite1\c$\test\ \\remotesite2\c$\test\ /C /E /F /H /S /Y
> > ^--- Does not work
> > xcopy c:\test\ c:\test\ /C /E /F /H /S /Y <--- Works
> > :
> > :
> > mkdir test6 <--- Works
> >
> >
> >
> > My guesses at the problem are:
> > - the ASP page does not run under a user with sufficient rights
> > I've checked and double checked. The "account used for anonymous
> > access" in this IIS manager is set to a domain admin account with
> > sufficient access
> > - there is some sort of weird windows security "feature" preventing
> > this sort of action.
> > Can't find any reference to something that would cause this sort of
> > behavior.
> > - No UNC support
> > Mapped the drives and still no luck
> >
> >
> > I am out of ideas as to why this is happening. I would appreciate any
> > pointers anyone may have.
> >
> >
> > Thanks,
> > Baruch Mettler
> >
> >
> >
> > Oh, BTW robocopy.exe is a cool little support tools copy tool. see
> >
> http://www.microsoft.com/resources/documentation/WindowsServ/2003/all/techref/en-us/Default.asp?url=/Resources/Documentation/windowsserv/2003/all/techre
> f/en-us/robocopy.asp
- Next message: Fabio: "Running scripts under administrator authority"
- Previous message: Tom Lavedas: "Re: WScript Sleep in HTML"
- In reply to: name: "Re: Problems running remote batch copy from wshshell asp script"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|