Re: Logon script not running

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Carlos Pereira (carlosp_at_nnnyahoo.com)
Date: 08/20/04


Date: Fri, 20 Aug 2004 11:55:04 +0200

Finally it works. The problem was one parameter of the xcopy command:
/c

After deleting this command, it works as it should in every computer.

Thank you very much for your help.

Carlos

On Thu, 19 Aug 2004 20:41:24 +1000, "Pegasus \(MVP\)" <I.can@fly.com>
wrote:

>
>"Carlos Pereira" <carlosp@nnnyahoo.com> wrote in message
>news:hdt8i0lvasmp6rupvi130m3aecptmq3s38@4ax.com...
>> Hi,
>>
>> Hi,
>>
>> I've got a small office network (one domain): Windows 2000 Server SP4
>> / Windows XP Pro SP1
>>
>> I am trying to implement small scripts for different tasks (I do not
>> have knowledge of VBS, I use MS-DOS BAT files).
>>
>> I have created the following BAT file:
>>
>> if exist "F:\%USERNAME%\Backup" (goto COPY) else mkdir
>> "F:\%USERNAME%\Backup"
>>
>> :COPY
>> xcopy /d /s /e /r /h /o /y "D:\Files\*.*" "F:\%USERNAME%\Backup"
>> echo The job is finish
>> pause
>>
>> F is a share of a folder located in a Windows 2000 Server. This unit
>> is permanently assigned to all users, therefore I do not need to
>> assign it through the script.
>>
>> - If I run the script locally in my computer logged in with my domain
>> administrator account, it works fine.
>> - If I run the script locally in any other computer logging in with a
>> domain user account (not a domain administrator account), it does not
>> works. I get a Access denied message in MS-DOS. The folder is created
>> in the network share, and a file with 0 Kb is also created. No other
>> file or folders are created or copied.
>> - If I create a GPO for the domain (top level), assign the BAT file to
>> a logon script and login in any computer of the domain (even my
>> computer), the script does not run. I do not see any MS-DOS screen at
>> startup, no folder is created in the network share (or elsewhere), and
>> no error message appears. It seem like the batch file it does not run
>> at all.
>>
>> I have tried with some sample VBS gathered from the Microsfot site,
>> and they work fine. They run as expected with any user account in any
>> computer.
>>
>> I understand I have 2 different problems:
>>
>> 1.- For some reason I do not quite understand, the batch cannot copy
>> files from a local folder to a newtwork share, unless I use my
>> administrator account. However, if I open the command window and use
>> the COPY command, I can copy any file or folder to any network
>> location. Take into account that the domain users are local
>> administrators in their computers.
>> 2.- My batch file does not run, but any other I have tried does.
>> Unfortunately, I do not know how to transfer this to a VBS script (if
>> it could help at all as a test).
>>
>> NOTE: The batch file is assigned to the whole domain, to the user
>> configuration part of the GPO, not to the computer part. I am
>> positively sure that no other GPO is blocking or modifying this GPO
>> (you can easily tell this, because other scripts are working fine.).
>> All users logon to the domain, never locally (they do not have a local
>> account). All domain users account exists in their WK with local
>> administrator rights.
>>
>> ¿Can anybody give me a hand on this?
>>
>> Thanks in advance and please excuse my ignorance on this issues
>>
>> Carlos
>
>As I pointed out when you posted your question in Spanish, you
>have a syntax error in your batch file:
>
>=================
>Bad version:
>if exist "F:\%USERNAME%\Backup" (goto COPY) else mkdir
>"F:\%USERNAME%\Backup"
>
>:COPY
>xcopy /d /s /e /r /h /o /y "D:\Files\*.*" "F:\%USERNAME%\Backup"
>echo The job is finished
>
>=================
>Better version:
>if exist "F:\%USERNAME%\Backup" (goto COPY) else (mkdir
>"F:\%USERNAME%\Backup")
>
>:COPY
>xcopy /d /s /e /r /h /o /y "D:\Files\*.*" "F:\%USERNAME%\Backup"
>echo The job is finished
>
>=================
>Best version:
>if not exist "F:\%USERNAME%\Backup" mkdir "F:\%USERNAME%\Backup"
>xcopy /d /s /e /r /h /o /y "D:\Files\*.*" "F:\%USERNAME%\Backup"
>echo The job is finished
>
>=================
>
>I suggest you take care of the syntax errors, then post again if you
>still have problems.
>



Relevant Pages

  • RE: Problematic Updates in Windows Vista
    ... Apologies for the errors in the instructions. ... Procedure for adding and removing the Administrator account. ... You should now be at the command prompt. ...
    (microsoft.public.windowsupdate)
  • Local Groups vs. AD Groups
    ... We have configured AD accounts for domain users (set to the Domain ... We also have an administrator account (for local ... We installed a piece of software using the local computer ...
    (microsoft.public.windows.server.active_directory)
  • Re: Can not resolve address by name
    ... sharepoint ask me for a valid domain account. ... all the domain users in the add users option. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Basic Authentication + IIS 5 + Windows 2000 + Frontpage 2002 = failure?
    ... administrator account -- we should have no problems at least browsing to ... server. ... | authentication dialog box. ...
    (microsoft.public.inetserver.iis.security)
  • Re: OWA distorted
    ... I have added the domain users, users, Authenticated Users in the securit ... on the bin folder if that will help in any way. ... if you hadn't changed the account used for Anonymous Access. ...
    (microsoft.public.exchange.admin)