[NTLUG:Discuss] Getting Linux and NT to play nice.

Kelledin kelledin+NTLUG at skarpsey.dyndns.org
Fri Apr 18 06:29:08 CDT 2003


On Friday 18 April 2003 05:10 am, Stephen Klein wrote:
> My question is, does anyone know of a way to get WinNT 4 to
> connect to a SAMBA share automatically from a reboot without
> someone logging in first.

Hmmm...I'm a little rusty on this.  Somewhere in the registry, 
deep under HKEY_LOCAL_MACHINE, is a subkey called "Run".  I used 
to know exactly where that was in the registry hierarchy (would 
probably still know if I worked with windows more), but I do 
remember that there's a "RunOnce" subkey right next to it.  Just 
do a registry search for "RunOnce" and it should get you there.

Stick an arbitrarily-named value in that subkey, with the data 
being the path to some command, and IIRC that command will get 
run on every boot, whether someone logs in or not.

Once you've done that, the next thing is to create a batch file 
that runs the necessary "net" commands to map the share to a 
drive letter, then runs your backup operation and unmaps the 
share before exiting.  Then just stick the path to that batch 
file in the "Run" subkey...

Too bad I never learned much about the Windows "net" command line 
tool. :(

-- 
Kelledin
"If a server crashes in a server farm and no one pings it, does 
it still cost four figures to fix?"




More information about the Discuss mailing list