Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,135 of 68,980    |
|    JJ to Ammammata    |
|    Re: [NT4] wait for a service to start    |
|    31 Jan 18 15:16:54    |
      From: jj4public@vfemail.net              On Tue, 30 Jan 2018 16:31:13 +0000 (UTC), Ammammata wrote:       > I run a batch file at startup, like this:       >       > net use s: \\192.168.1.2\c password /user:administrator       >       > but fails with the message "the workstation service hasn't been started"       >       > If I check in services, the a.m. service is running, automatic start       >       > if I manually run the batch file after a while it works       >       > how can I tell the batch file to wait until the workstation service is up &       > running?       >       > or just insert a delay of - say - 10 seconds?       >       > TIA              Use this.              @echo off       :check       if exist \\192.168.1.2\c goto done       sleep 1       goto check       :done       net use s: \\192.168.1.2\c password /user:administrator              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca