locked
Cannot run batch file as logon script in Windows Server 2008 AD

    Question

  • Hello, everyone.

    I am trying to deploy a simple batch file logon script that will map a local folder to a drive letter using subst .

    There is a new GPO that contains only this setting, is mapped to a single OU with only one user in it.

    GP results says the policy is well applied, the server´s log says the same thing.

    However, a simple command as "subst g: C:\tests\" does not work.

    I can, with the same user, access the usual Netlogon folder, run the script by hand and it works.

    Any ideas...?

    Thanks in advance,

    Ivo Pereira
    IT Consultant
    Portugal
    ComputerDoc
    Thursday, May 14, 2009 3:57 PM

Answers

  • hi there,

    i could only think of getting your script file and re-produce in my lab.

    please do email me at sainathss@Live.in and please do provide me step-by-step detail what you have followed so that i can re-pro the same here.

    sainath windows driver development.
    Monday, June 08, 2009 4:35 PM

All replies

  • hi there,

    i would like you to test manually whether subst is working on windows 2008

    run that same batch file manually on windows 2008 and check the behavior , the command which you are running is correct.


    sainath Attending Microsoft Teched 2009
    Tuesday, May 19, 2009 1:55 PM
  • Hello, Sainath.

    Yes, I have tried running the command manually before, works perfectly.

    I have created more than one test user, tried it on both on different folders and all works.

    I am starting to consider migrating the script to VBScript.. Batch files are starting to irritate me very much :(

    Anyway, it would be interesting to solve this issue.

    Maybe the problem resides in some batch file line at the beggining of the script that must be in the file..? Or something else..?

    Thanks in advance,

    Ivo Pereira
    IT Consultant
    Portugal

    ComputerDoc
    Tuesday, May 19, 2009 1:59 PM
  • hi there,

    if manuall command works then it is something to do with

    a) either calling the batch file

    b) problem with the batch file content.


    sainath Attending Microsoft Teched 2009
    Tuesday, May 19, 2009 2:01 PM
  • Hello, Sainath.

    Thank you for your very quick reply.

    I am calling the batch file from a GPO linked to an OU, the script is located inside the netlogon\policies\etc folder, I have manually checked the path and it is correct.

    The strange thing is that Windows tells me that the policy ran OK and the script was executed OK, so it must be some problem with the batch file indeed...

    The file´s content is:


    @ECHO OFF

    SUBST G: C:\Test


    The "Test" folder has writing permissions for the given user (modify).

    Any ideas...? Maybe some batch file trick I must use...?



    Thanks in advance,

    Ivo Pereira
    IT Consultant
    Portugal

    ComputerDoc
    Tuesday, May 19, 2009 2:10 PM
  • hi there,

    can you check if software restriction policy is disallowed ?

    also can you check the same on windows 2003 Domain ?


    sainath Attending Microsoft Teched 2009
    Tuesday, May 19, 2009 5:55 PM
  • hi there,

    did you had a chance to resolve the issue ?
    sainath windows driver development.
    Sunday, May 24, 2009 11:58 PM
  • Hello, Sainath.



    No, I could not yet solve this issue.

    I have checked and double checked everything again and again and I cannot find the problem's source...

    Any additional ideas?

    This is very strange for me, I always could use batch files as logon scripts.. I will try to re-code the script as VBScript and see if that helps solve the problem.



    Thanks in advance,

    Ivo Pereira
    IT Consultant
    Portugal
    ComputerDoc
    Wednesday, May 27, 2009 11:35 AM
  • hi there,

    i could only think of getting your script file and re-produce in my lab.

    please do email me at sainathss@Live.in and please do provide me step-by-step detail what you have followed so that i can re-pro the same here.

    sainath windows driver development.
    Monday, June 08, 2009 4:35 PM