Re: Script is not working?
- From: Umesh Thakur <ucthakur-NOSPAM@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 13 Mar 2006 12:06:10 -0800
----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.
that prevent it from copying. Yet, this should be a restriction only for the"BTW, Suppose that if I configured GPO to deny access to certain drives will
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
- References:
- Script is not working?
- From: altria
- Re: Script is not working?
- From: altria
- Script is not working?
- Prev by Date: Disable local account
- Next by Date: Re: VBScript to add many computers to and group
- Previous by thread: Re: Script is not working?
- Next by thread: collect contact information
- Index(es):
Relevant Pages
|