Startup script cannot find files?

G

Guest

Hi all

I am trying to run a startup script via GPO with the following parameters:

Script Name: cscript.ex
Parameters: filename.ws

However is does not run and gives the error "cannot find C:\winnt\system32\filename.wsf" Why is it trying to look in there for the script when it is definately in the scripts area for that policy

I need to run the script with cscript so I even tried making a batch file with the parameters "cscript filename.wsf" the batch file runs but still spits the error that it cannot find the script?

Any ideas

Rob T
 
A

Andrew Mitchell

=?Utf-8?B?Um9iLVQ=?= said:
Hi all,

I am trying to run a startup script via GPO with the following
parameters:

Script Name: cscript.exe
Parameters: filename.wsf

However is does not run and gives the error "cannot find
C:\winnt\system32\filename.wsf" Why is it trying to look in there for
the script when it is definately in the scripts area for that policy?

I need to run the script with cscript so I even tried making a batch
file with the parameters "cscript filename.wsf" the batch file runs but
still spits the error that it cannot find the script??

Any ideas ?

Cscript.exe resides in c:\winnt\system32, so that will become your working
directory. That's why it's looking there for your script file.
Try adding the full UNC path as the argument and see what happens (ie.
\\server\sysvol\scripts\filename.wsf)

Andy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top