Hi, I'm trying to get Windows 7 to run a logon script which mounts a share at login. This works fine for Windows XP In my smb.conf I have the following logon script = %G.cmd logon path = \\%L\profiles\%U logon drive = H: logon home = \\YOUNGMUNSTER\homes The script is @echo @echo Setting System Policies: Please Wait. @echo off NET TIME \\janus /SET /YES > X net use M: \\youngmunster\ug2010 /persistent:no > X del X The homes share works fine but the logon script does not seem to be executed. Any ideas how to get this working. Thanks Tony
On Thu, Sep 09, 2010 at 11:04:42AM +0100, Tony Molloy wrote:> I'm trying to get Windows 7 to run a logon script which mounts a share at > login. This works fine for Windows XPThis doesn't address the logon scripts problem, but consider using Group Policy Preferences to map a drive at login. It's a cleaner approach than a logon script. -- Philip
You can try this. It works for me on vista and win7: net use m: /HOME On Thu, Sep 9, 2010 at 12:04 PM, Tony Molloy <tony.molloy at ul.ie> wrote:> > Hi, > > I'm trying to get Windows 7 to run a logon script which mounts a share at > login. This works fine for Windows XP > > In my smb.conf I have the following > > ? ? ? ?logon script = %G.cmd > ? ? ? ?logon path = \\%L\profiles\%U > ? ? ? ?logon drive = H: > ? ? ? ?logon home = \\YOUNGMUNSTER\homes > > The script is > > ? ? ? ?@echo > ? ? ? ?@echo ? ? ? ? ? ?Setting System Policies: ?Please Wait. > ? ? ? ?@echo off > ? ? ? ?NET TIME \\janus /SET /YES > X > ? ? ? ?net use M: \\youngmunster\ug2010 /persistent:no > X > ? ? ? ?del X > > > The homes share works fine but the logon script does not seem to be executed. > Any ideas how to get this working. > > Thanks > > Tony > -- > To unsubscribe from this list go to the following URL and read the > instructions: ?https://lists.samba.org/mailman/options/samba >
Hi Dario, Your configuration attracted my attention. What exactly do you include in */usr/local/bin/netlogon*? Regards --- *Santiago DIEZ Directeur **Portable: +33 6 37 90 81 98 Bureau: +33 9 70 44 77 87* *32 boulevard de Strasbourg, 75010 Paris* On Tue, Mar 22, 2011 at 5:20 PM, Dario Work <dariowork at hotmail.com> wrote:> I had the same problem. > > I fixed it with the following in smb.conf: > > ... > > preexec = /usr/local/bin/netlogon %U > logon drive = X: > logon script = %U.bat > ; logon path = \\%L\profiles\%U > ; logon home = \\%N\%U > > ... > > [netlogon] > comment = The domain logon service > path = /home/netlogon > ; read only = yes > public = no > writeable = no > browsable = no > > Regards, > > Dario. > > -- > View this message in context: > http://samba.2283325.n4.nabble.com/Samba-Windows-7-and-logon-scripts-tp2532596p3396892.html > Sent from the Samba - General mailing list archive at Nabble.com. > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >