+ Post New Thread
Results 1 to 2 of 2
Windows Thread, copying a file at logon in Technical; am trying to copy the login script on to the desktop of some laptops at login (dont ask) using the ...
  1. #1
    browolf's Avatar
    Join Date
    Jun 2005
    Location
    Mars
    Posts
    1,527
    Thank Post
    107
    Thanked 89 Times in 75 Posts
    Blog Entries
    46
    Rep Power
    40

    copying a file at logon

    am trying to copy the login script on to the desktop of some laptops at login (dont ask)

    using the command

    if %computername:~0,3% == LAP xcopy /Y /D \\lsahtc_win2k1\netlogon\ntstaff.bat "c:\documents and settings\%username%\desktop"


    if i run the login script in a cmd window after login has occurred it works fine. it doesnt work when the login script runs normally. is this something to do with profiles not being initialised or something? any thoughts on what to do to get it to work

    thx

  2. #2
    sahmeepee's Avatar
    Join Date
    Oct 2005
    Location
    Greater Manchester
    Posts
    795
    Thank Post
    20
    Thanked 70 Times in 42 Posts
    Rep Power
    34

    Re: copying a file at logon

    Try putting something like:

    Code:
    echo computer name begins with
    echo %computername:~0,3%
    echo check for batch file
    if exist \\lsahtc_win2k1\netlogon\ntstaff.bat echo batch file exists
    echo path to desktop is
    echo "c:\documents and settings\%username%\desktop"
    pause
    at the top of your script while you're testing and see if you get the output you'd expect. It won't fix it, but it's where I'd start.

SHARE:
+ Post New Thread

Similar Threads

  1. copying a file without admin
    By strawberry in forum Windows
    Replies: 2
    Last Post: 20th September 2007, 09:23 AM
  2. Copying CDs with Vista
    By enjay in forum Windows Vista
    Replies: 4
    Last Post: 6th September 2007, 02:56 PM
  3. File Copying
    By Kwyjibo in forum Scripts
    Replies: 15
    Last Post: 9th May 2007, 03:30 PM
  4. Copying DVDs
    By mortstar in forum Hardware
    Replies: 9
    Last Post: 1st February 2007, 01:34 PM
  5. Replies: 4
    Last Post: 23rd March 2006, 06:27 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •