[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 456
  • Last Modified:

Procedure for creating a simple logon script for roaming profile user

Hi all,

I've never had to use logon scripts before so I need some help.  I need to create a very simple .bat logon script for a user with a roaming profile.  The script will basically copy some files from the server to the computer the user is working on.  Where would I store the script?  Can I use just a regular .bat file?  Can anyone give me a brief on the procedure for setting this up?  Thanks.

Charlie
0
ckangas7
Asked:
ckangas7
  • 2
  • 2
3 Solutions
 
SkUllbloCkCommented:
Logon scripts are usually stored in the C:\WINDOWS\SYSVOL\domain\scripts\ folder
I am guessing that the environment must be a domain... open active directory and go to the properties of the user who requires this logon script, click on the profile tab and add the .bat filename under logon script:

what type of files need to be copied? usually a correctly configured roaming profile wont need file to be copied manually, it should be done by the OS, unless they require specific files.
0
 
bwalker1Commented:
Make sure that you give the "read" and "apply group policy" to the users that need the script as well.  That way you do not have to give the script to every user in AD, just the ones that need it.

Also, you might want to think about using offline files instead of a script - that essentially does the same thing, but is more sophistacated than using a .bat file to copy files from a server to client and back.
0
 
ckangas7Author Commented:
Hey guys,

Thanks for your input.  To answer your questions there is only one file that needs to be copied.  For some reson a paticular user keeps losing her normal.dot file for MS Word, evertime she logs off and logs back on the Domain.  It seems that the file dissapears on logoff and is created new on login.  It doesn't matter if I put the correct normal.dot file in her profile on the server or on her workstation.  I think It might be an issue with some other software we use that adds some macros to the normal.dot file.  I have a request with the software vendor to investigate the issue.  The problem is tied to her profile as it travels to whatever computer she logs onto.  I have nuked and rebuilt her profile twice now.  It fixes the problem for awhile, but then it comes back.

My idea for a temporary workaround is to create a logon script that will copy the correct normal.dot file from the server to her machine everytime she logs on.  

When the logon script runs will it run from the server or will it run as if it where on the user's workstation?  If it will run only on the Server, how can I direct the server to copy the file to the correct computer if the user is logging on at different workstations?  Thanks for your help.  Point will be awarded.

Charlie
0
 
SkUllbloCkCommented:
Hi Charlie

The script is luanched on the client side.. in other words it runs from the users side.
If you really want to use a batch file, he is an example of code that you could use:

xcopy <source> <destination> /v /q /y /z

<source> is the location of the file on ther server (refference it through a shared location.. ie: \\192.168.0.1\shareDirectory1\Filename)
<destination> is the location you want the file to go. (refference it to the exactly DIRECTORY.. ie: c:\directory1)
/v means it will verify the file copied
/q does this in a "quiet mode" (no xcopy messages displayed)
/y suppresses any prompts
/z means the file will copy in restartable mode
0
 
ckangas7Author Commented:
You guys are great.  After the last profile nuke the problem has not come back, but if it does I will be ready.  I also have a better idea of how to write logon scripts for other issues that might arise.  Thanks.
0

Featured Post

Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now