VBscript running batch.. access denied error

LantzvillianLantzvillian Member Posts: 24 ■□□□□□□□□□
Hello all,

I am putting together a usb unit for work that autoruns on windows boxes and my vbscirpt is running into "Access is denied" errors. My script runs just fine, but when it runs a command the command looks like it is running...

I have it echoing the "command executed"
Next line it says Access is denied...

All of the files the script needs are there where the vbs is being ran. However, if I ran the script locally on the box it would work. I am sure my problem is that to get the script to run you have to use a cdfs partition...


Any ideas? I tried this with a batch runnign off of the stick, but its obviously something to do with the way cdfs partitiosn are held.

Ronnie

Comments

  • JDMurrayJDMurray Admin Posts: 13,078 Admin
    An Error 5 is usually an indication of insufficient privilege level. Are you running within a context that has all the necessary privileges for the command? Try running your vbs with Administrator or Local System privileges. And is this on XP/Server 2003 or Vista/Server 2008?
  • LantzvillianLantzvillian Member Posts: 24 ■□□□□□□□□□
    It was XP pro, home and on server 2003. I eventually got it to work with a combination of using cscript and impersonation and a batch script. obSHell.Run for example absolutely hated running the exe...

    I think alot of it also hadf to do with the fact that the script I was working on was crafting packets.. which I guess needs more permissions with the Windows API.
Sign In or Register to comment.