Re: Script is not working?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



----I am adding it as part of the Logon Section under User config....Do you
think I should try the Comp Config Startup script?

You should not adding the script to Comp config startup/shutdown script
section
because no user will be logged-on when computer starts.

"BTW, Suppose that if I configured GPO to deny access to certain drives will
that prevent it from copying. Yet, this should be a restriction only for the
user configuration and not the computer configuration. "

If you have configured a GPO to deny access to certain drives/folders to
particular user/group, that user/group will certainly not be able to read
files on that drive/dir.

Best way to identify the problem is to comment out that line (on error
resume next) and login-logoff using users on machines, see what error you're
getting. It will help finding exact cause of error and possibly, fixing it.


-----
Umesh

"Old programmers never die. They just terminate and stay resident."



"altria" wrote:



Thanks Umesh for your fast response.....


comment out the line
ON Error Resume Next

----I will remove this so that i can get further info

so, you will come to know the exact error when script is executed using GPO.

are you adding script to Logon/Logoff section GPO?

----I am adding it as part of the Logon Section under User config....Do you
think I should try the Comp Config Startup script?

it is also possible that the file you're trying to copy does not exists on
machine where the script is failing.

----Well...I am sure the file exists. Actually the files are part of the MSI
package for the program. If I look under the drive I can see all the files
which i would like copied and move do actually exist

I would say, before copying the file, you may want to verify whether source
file ecists or not using fileExists method of fileSystemObject.

---I will try the file exist method and let you know thanks

Regards,

Umesh

BTW, Suppose that if I configured GPO to deny access to certain drives will
that prevent it from copying. Yet, this should be a restriction only for the
user configuration and not the computer configuration.

TIA,
Altria

"Umesh Thakur" <ucthakur-NOSPAM@xxxxxxxxxxxxxxxxxx> wrote in message
news:BAD8049E-0653-49C6-81FE-2898A2815F55@xxxxxxxxxxxxxxxx
comment out the line
ON Error Resume Next

so, you will come to know the exact error when script is executed using
GPO.

are you adding script to Logon/Logoff section GPO?
it is also possible that the file you're trying to copy does not exists on
machine where the script is failing.

I would say, before copying the file, you may want to verify whether
source
file ecists or not using fileExists method of fileSystemObject.

Regards,

Umesh

"Old programmers never die. They just terminate and stay resident."



"altria" wrote:

Hello All,
Sorry for the cross post but i realized it was int he wrong forum...

Anyway, I seem to be having trouble with this script...In fact it is not
working so I would say that is more than a little trouble. I am looking
at
it and cant figure out why it is not able to run successfully thru GPO
but
when it runs locally I am able to execute.

Any insights?

I am trying to use group policy (logon script portion) to copy files into
the Documents and
Settings\username\Application Data\Microsoft \Word\Startup folder. The
actual files which i would like to copy exist on the root drive on the
same
machine but I have not been successful with the following script ;

ON Error Resume Next
Dim obj, strUser
Set obj = CreateObject("WScript.Network")
strUser = obj.UserName

Dim strPath
strPath = "c:\Documents and Settings\" & strUser & "\Application
Data\Microsoft\Word\STARTUP\"

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "c:\Program Files\App1\teris.dot" , "c:\Program
Files\App1\teris1.dot"
objFSO.MoveFile "c:\Program Files\App1\teris1.dot" , strPath

Thanks in advance,
Altria







.



Relevant Pages

  • Re: WMI missing security settings
    ... the rsop shows the finally result view ... every effective GPO, it will be hidden in the rsop view. ... ffWhenHourExpire) are shown with the script is because they are configured ... if setting the "Computer Configuration -> Windows Settings ...
    (microsoft.public.platformsdk.security)
  • help with a home network jumpstart
    ... I have the blade running BIND 8 to serve DNS to the home network. ... Here's the output of the boot net - install: ... Using RPC Bootparams for network configuration information. ... Using begin script: install_begin ...
    (SunManagers)
  • Jumpstart: syntax error and trying to load from /cdrom media, which disk to use for Solaris 8 image
    ... I'm not sure if I need to use that disk or the Solaris 8 Installation ... Using RPC Bootparams for network configuration information. ... Using finish script: diag_drv.fin ... Executing JumpStart preinstall phase... ...
    (SunManagers)
  • Re: (hopefully perl) API to /etc/network/interfaces?
    ... like to edit a 4in6 tunnel endpoint and reconfigure the interface. ... there's no desire for added abstractions to configuration files. ... alter network settings based on CGI scripts from Apache. ... I don't see how a pre-up script can ...
    (Debian-User)
  • Re: Some basic unix directory listing questions (long)
    ... I use this method extensively for perl "suites" which bring their ... own libraries, configuration files, etc with them. ... directory of your script. ... As for hard links - no chance. ...
    (comp.unix.shell)