Announcement

Collapse
No announcement yet.

Batch file at login

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Batch file at login

    I need to run a batch file at login to create 2 drives.
    The batch files reads:
    Echo off
    net use p : //Workgroups
    net use w: //General

    The issue isnt with the script cause I can run it manually and it maps fine but when assigning the script to the users account in AD in the 'Login script' field. The batch files is stored in C:\WINDOWS\SYSVOL\domain on the server (full name LLHQSERV01.LL.MITTON). I would apprecaite any suggestions. I am running out of hair to pull out

  • #2
    Re: Batch file at login

    Since you didn't really ask a question... I'm guessing you want to know what you should put in the script field in the profile.
    Make sure the file is in the path you use.

    Code:
    \\LLHQSERV01\SYSVOL\YOURDOMAINNAME\SCRIPTS\LOGON\SCRIPTNAME.BAT
    Last edited by ahinson; 23rd March 2007, 05:39.
    Andrew

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

    Comment


    • #3
      Re: Batch file at login

      Thanks for surmising what I forgot to put in the original post ahinson. I did try what you suggested but it didn't work. I have shared the folder Scripts as well. The client is still not showing the drives mapped. Would it help if i sned or post a screenshot in here of the account config?

      Comment


      • #4
        Re: Batch file at login

        I would try few more things:
        - check the Event Viewer on the station that does not map the drives. Look for messages related to the login script;
        - try to access from the station the share on the server, to be sure there's no permissions issue;
        - run the script from the station's command line, to check that the commands are right.

        Two notes:
        - if your OS is 2000 and up (and I assume it is, since you're working AD), I would get used to work with CMD files rather than BAT files. You only need to change the extension of the file. But CMD files are richer in their possibilities.
        Articles related to the issue:
        http://www.velocityreviews.com/forum...atch-file.html
        http://www.microsoft.com/technet/pro.../FAQW2KCP.mspx
        (there is one more I would like to give you, I don't find it at the moment, I'll keep looking).
        - the syntax of the command is: net use [DriveLetter]: \\[ServerName]\[ShareName] . Is it a typo that you wrote something else?

        Let us know if anything of this helped.

        Sorin Solomon


        In order to succeed, your desire for success should be greater than your fear of failure.
        -

        Comment


        • #5
          Re: Batch file at login

          Originally posted by Broodgeneral View Post
          I need to run a batch file at login to create 2 drives.
          The batch files reads:
          Echo off
          net use p : //Workgroups
          net use w: //General

          The issue isnt with the script cause I can run it manually and it maps fine but when assigning the script to the users account in AD in the 'Login script' field. The batch files is stored in C:\WINDOWS\SYSVOL\domain on the server (full name LLHQSERV01.LL.MITTON). I would apprecaite any suggestions. I am running out of hair to pull out
          Try turning your slashes around.

          net use p: \\servername\share

          [EDIT]

          Ignore the above as I didn't read you post correctly. Check that the script name and the name you entered in the location that Wullie has identified below have IDENTICAL spelling.
          Last edited by biggles77; 23rd March 2007, 15:05.
          1 1 was a racehorse.
          2 2 was 1 2.
          1 1 1 1 race 1 day,
          2 2 1 1 2

          Comment


          • #6
            Re: Batch file at login

            We have a logon batch file, i know i really should be using VBScript but hey it works, which runs when the user logs in.

            All i do is enter the name of the script in the Logon Script: text box. You do not need to enter the full path to it.

            You then need to store this script where Ahinson said and it will work.
            Attached Files

            Comment

            Working...
            X