Jump to content

Access Denied when launching a remote script


mcslemon

Recommended Posts

Hi all,

I've put together a WinPE 2.0 (Vista) CD that will hopefully help us resolve some imaging issues as we plan to use ImageX. Part of my plan is to use vbscripts on the network server to control the process.

Windows scripts are working as I'm using a fairly complicated windows script to access the other script on the server.. but whenever I try to launch the network script, it gives me an access denied error.

Because we don't actually have many 2003 licenses available, I'm actually using a Linux box with a Samba server as the network store.. I don't see how it can be the Linux box as I can browse, read and write to it. I've noticed other people having access denied errors, but aren't using vbscripts.

Any help would be appreciated. Oh, I've actually managed to test it on a 2003 box and it does the same thing!

Cheers,

Neil.

Link to comment
Share on other sites


I map the network drive with the first script on the CD

set onet = createobject("wscript.network")

onet.mapnetworkdrive "i:", "\\server\path", , "domain\credentials", "password"

This works fine but the execution doesn't.

I call the script by doing:

shell.run("i:\script.vbs")

shell is createobject("wscript.shell")

The key thing is that I've tried to execute the script manually from the server and it doesn't work, from either the Linux or the 2003 box.

I forgot to say, when I execute the script it gives a generic "User has cancelled the operation". When I execute from the command line it returns "Access Denied".

Link to comment
Share on other sites

Ok, I ran a test script with the calls you are using and received a "User has cancelled operation" error. However, when I modified the run command it worked flawlessly. Try using shell.run("cscript i:\script.vbs") or shell.run("wscript i:\script.vbs").

Edited by zorphnog
Link to comment
Share on other sites

Ok, I ran a test script with the calls you are using and received a "User has cancelled operation" error. However, when I modified the run command it worked flawlessly. Try using shell.run("cscript i:\script.vbs") or shell.run("wscript i:\script.vbs").

Excellent, that works! Thanks!

what is the script on the server doing? some operations will not run correctly from remote locations.

I'm simply running ImageX ..

Cheers for the help!

Neil.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...