Networking Forums

Networking Forums > Computer Networking > Windows Networking > AutoexNT not executing NET USE cammand in AutoexNT.bat file

Reply
Thread Tools Display Modes

AutoexNT not executing NET USE cammand in AutoexNT.bat file

 
 
markh
Guest
Posts: n/a

 
      08-02-2006, 11:04 PM
I amrunning an application on a Win2K server which makes use of data
on CIFS shares. The app runs as a service which should start
automatically on bootup. Normal automatic startup can not be used
because the file-sharing processes start up too late and because the
app needs a drive letter mapped to the share.

We normally handle this issue by using the AutoexNT service, which is set to
start automatically. The app is set to start after AutoexNT. AutoexNT is made
dependent on lanmanserver and lanmanworkstation services and is thus
delayed until file-sharing is up.

The AutoexNT.bat does the following
:

1) writes a timestamp to an output file
2) delete the existing drive letter mapping, routing output to the log file
3) map the drive letter to the share, routing output to the log file
4) repeat for the other drives to be mapped

This works fine under Windows 2000. I am now trying it under Windows
2003, and find that it executes, but does not map the drive after executing
the AutoexNT.bat file. I see that the .bat file starts to run OK by looking
in the application event log. The output file shows the timestamp, but no
deletions or mappings. However, if I manually execute the AutoexNT.bat file
immediately thereafter, it works fine and there are entries in the output
file for the deletions and mappings.
 
Reply With Quote
 
 
 
 
Tony Guadagno
Guest
Posts: n/a

 
      08-03-2006, 01:08 AM
Mark,
I am doing what you are trying to do. I have noticed that it works
differently in win2k3 than win2k. as a matter of fact, I cannot get it
working in win2k. but anyway, i do this

@echo off
c:\windows\system32\net use u: \\server\webfiles <password>
/user:domain\administrator


also, i leave the service (autoexnt) set to logon as local system account.
If i remember, you have to change that on win2k. also, if you put a pause at
the end of the bat file, and re-install autoexnt with the /interactive flag,
you should be able to see what happend/failed.

hope this helps

"markh" wrote:

> I amrunning an application on a Win2K server which makes use of data
> on CIFS shares. The app runs as a service which should start
> automatically on bootup. Normal automatic startup can not be used
> because the file-sharing processes start up too late and because the
> app needs a drive letter mapped to the share.
>
> We normally handle this issue by using the AutoexNT service, which is set to
> start automatically. The app is set to start after AutoexNT. AutoexNT is made
> dependent on lanmanserver and lanmanworkstation services and is thus
> delayed until file-sharing is up.
>
> The AutoexNT.bat does the following
> :
>
> 1) writes a timestamp to an output file
> 2) delete the existing drive letter mapping, routing output to the log file
> 3) map the drive letter to the share, routing output to the log file
> 4) repeat for the other drives to be mapped
>
> This works fine under Windows 2000. I am now trying it under Windows
> 2003, and find that it executes, but does not map the drive after executing
> the AutoexNT.bat file. I see that the .bat file starts to run OK by looking
> in the application event log. The output file shows the timestamp, but no
> deletions or mappings. However, if I manually execute the AutoexNT.bat file
> immediately thereafter, it works fine and there are entries in the output
> file for the deletions and mappings.

 
Reply With Quote
 
markh
Guest
Posts: n/a

 
      08-04-2006, 01:57 PM
Tony,

Thanks for the reply. I can't get to the console of my system this week, but
will try out the pause in the batch file and continue debug next week. You
say that you've got this working on W2K3 Server now? How does it work
differently between the two releases?

Thanks,

Mark Hayakawa

"Tony Guadagno" wrote:

> Mark,
> I am doing what you are trying to do. I have noticed that it works
> differently in win2k3 than win2k. as a matter of fact, I cannot get it
> working in win2k. but anyway, i do this
>
> @echo off
> c:\windows\system32\net use u: \\server\webfiles <password>
> /user:domain\administrator
>
>
> also, i leave the service (autoexnt) set to logon as local system account.
> If i remember, you have to change that on win2k. also, if you put a pause at
> the end of the bat file, and re-install autoexnt with the /interactive flag,
> you should be able to see what happend/failed.
>
> hope this helps
>
> "markh" wrote:
>
> > I amrunning an application on a Win2K server which makes use of data
> > on CIFS shares. The app runs as a service which should start
> > automatically on bootup. Normal automatic startup can not be used
> > because the file-sharing processes start up too late and because the
> > app needs a drive letter mapped to the share.
> >
> > We normally handle this issue by using the AutoexNT service, which is set to
> > start automatically. The app is set to start after AutoexNT. AutoexNT is made
> > dependent on lanmanserver and lanmanworkstation services and is thus
> > delayed until file-sharing is up.
> >
> > The AutoexNT.bat does the following
> > :
> >
> > 1) writes a timestamp to an output file
> > 2) delete the existing drive letter mapping, routing output to the log file
> > 3) map the drive letter to the share, routing output to the log file
> > 4) repeat for the other drives to be mapped
> >
> > This works fine under Windows 2000. I am now trying it under Windows
> > 2003, and find that it executes, but does not map the drive after executing
> > the AutoexNT.bat file. I see that the .bat file starts to run OK by looking
> > in the application event log. The output file shows the timestamp, but no
> > deletions or mappings. However, if I manually execute the AutoexNT.bat file
> > immediately thereafter, it works fine and there are entries in the output
> > file for the deletions and mappings.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
executing ssh from shell script R C V Linux Networking 2 03-23-2008 07:20 PM
executing ssh from shell script R C V Linux Networking 3 03-19-2008 07:53 PM
pppd ip-up.d script not executing TopperUK Linux Networking 3 05-22-2007 03:00 PM
Executing programs Manfred Nowak Windows Networking 0 03-06-2004 09:34 PM
executing webalizer from crontab Allan Bruce Linux Networking 1 11-20-2003 03:10 PM



1 2 3 4 5 6 7 8 9 10 11