Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

windows logon script help

Status
Not open for further replies.

sugu

Programmer
Jan 12, 2004
90
SG
HI,

I'm trying to figure out on how to write a windows logon script to copy a file to all the client systems (win XP sp2) from win 2003 gpo?


Thanks!

-su
 
@seeseegee:
Nice, but I would like to find same scripts with DOS commands. Have some link for me to? :p
 
Delphard,

Bat files are a thing of the past. It is time you upgraded to vbscript. The FAQ I linked to above has a fully working and easily modified login script you can use. It is well documented and should be easy enough for you to figure out.

I highly recommend you upgrade your skills and give this a try. If you run into trouble I am willing to help.



I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Delphard: I try not to regress when I can...what you may want to do is take markdmac's advice on learning vbscript but using batch files in the process.

You can always create the vbs file to do your actions and then call upon it with a batch file; seems redundant but if your file extension must end in .bat, then here's an alternative.
 
Hi,

I created a vb script to copy a file from the server to the client systems via gpo..but the file was copied to the specified folder in the client system.

Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "\\servername\folder name\GRC.DAT" , "C:\Documents and Settings\All Users\Application Data\Symantec\Symantec AntiVirus Corporate Edition\7.5\", OverwriteExisting

Pls advise. Thanks!


-su
 
the script looks fine from what i'm seeing, you'll need to elaborate on the issue.

I would just change one thing with your script at this point...

Const OverwriteExisting = True
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell)
objFSO.CopyFile "\\servername\folder name\GRC.DAT",objShell.ExpandEnvironmentStrings("%AllUsersProfile%") & "\Application Data\Symantec\Symantec AntiVirus Corporate Edition\7.5\",OverwriteExisting

The [objShell.ExpandEnvironmentStrings("%AllUsersProfile%")] will get you to C:\Documents and Settings\All Users\
 
Correction in Line 3
Set objShell = CreateObject("WScript.Shell")

(forgot the end quote)
 
Your users will probably NOT have rights to the destination folder.

Why are you trying to do this file copy? The Symantec Console will manage this for you.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Users won't have access to the All User profile - but if you assign the script as a startup script then it should work fine. I done this recently (using gbscript :)) to remove a shortcut from the all user profile and copy a different one across. I can post it if you like

Irish Poetry - Karen O'Connor
Get your Irish Poetry Published
Garten und Landschaftsbau
 
I'm with Mark - the SSC should do this.

Pat Richard, MCSE(2) MCSA:Messaging, CNA(2)
 
Hi,

Thanks to all for the valuable posts.

Recently, we assigned another server as the antivirus server. So, i need to update the existing Parent server group to the new one in the clients' system.
So, i'm trying to use gpo to copy the GRC file to the clients systems.

I have updated the vb script as mentioned by seeseegee.

Will post if that worked.

Thanks!

-su
 
Hi,

I tried the method mentioned by seeseegee and assigned it as startup script. But, still the parent server is not updated as indicated in the GRC.Dat file.

Is there any other way?
 
I'm not familiar with Symantec AV (I presume this is AV software) but I presume you're applying this GRC.dat file to client PC's via startup script and then the parent server should show some updated info about the client? Did you check the client after the startup script to see if the file did actually copy across (modified date or file size should be good indicator if it was successful or not)??? Maybe try running the VBS file as a user with admin rights so that you can see if there are any VBS errors also. If the file did copy across then I would imaginge it's a problem with Symantec rather than VBS or GPO

Irish Poetry - Karen O'Connor
Get your Irish Poetry Published
Garten und Landschaftsbau
 
You should be able to use the Symantec System Console (SSC) to drag and drop the clients to the new server.

Which version of Symantec are you running?

gmail2: the GRC.DAT file with Symantec is removed/updated automatically after a few minutes, so he would have to check the file real-time to confirm it copied over correctly.

If there was a permissions issue, the clients would have received a script error.
 
Hi


I'm using symantec client security v9.0 and the problem is that the actual parent server somewhat was unable to be detected by the SSC discovery out of blue...and all the clients are lost with the parent in SSC. As such, i'm trying to copy the GRC.Dat file to the clients so as to update to a new parent server without manually installing the symantec client security.
 
Go to a client machine, copy the grc.dat to the appropriate folder, restart the Symantec Antivirus service, wait a few moments for the grc.dat file to remove itself from the folder and then open the application to see what server group the client is assigned to.

Confirm all this works, then perform a rediscovery at the ssc to see if the client displays. I would clear the cache, when doing the discovery...
 
This is one of the reasons I hate Symantec Corporate AV. You are also behind in versions as I believe the latest is version 10.0. I would recommend that you check if you are support from Symantec and contact them. They may be able to assist you with the current problem.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Hi

I managed to run the vbs script that i have indicated in my earlier post in my system using a scheduled task and set it to run as administrator.

How do i set it do the above mentioned task to be push through a group policy to all other systems in the domain?

Thanks!

-su
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top