|
windows
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
accessing network drive at startupserver at work running lmgrd from a mapped drive. Previously, when running win2k server, I was able to create a local bat script and setup a scheduled task to launch this bat script that will in turn access the mapped drive with the application and licenses. This worked fine until i switched over to Windows XP. Now my script fails to access the mapped drive at startup. And when I manually run the scheduled task, it will start but stop when I log off. So my question... Is there anyway for me to access a mapped drive in XP at startup and run an application in the background. Here is my bat script: set DRIVE_LETTER=T: echo %DATE% %TIME% > C:\autoexnt.log net use %DRIVE_LETTER% \\192.27.176.253\license /USER:administrator / PERSISTENT:YES 2>> C:\autoexnt.log echo %ERRORLEVEL% >> C:\autoexnt.log set hh=%time:~0,2% if "%time:~0,1%"==" " set hh=0%hh:~1,1% set yymmdd_hhmmss=%date:~10,4%%date:~4,2%%date:~7,2%_%hh%%time:~3,2% %time:~6,2% set HOSTNAME=%COMPUTERNAME% set LICENSE=Ansys set LOG_NAME=%yymmdd_hhmmss%_%HOSTNAME%.log for %%i in (%LICENSE%) do %DRIVE_LETTER%\%%i\bin\lmgrd.exe -local -c %DRIVE_LETTER%\%%i\license\license.dat -l %DRIVE_LETTER%\%%i\log\%%i- %LOG_NAME% On Feb 27, 1:22 pm, d_d***@my-deja.com wrote:
Show quoteHide quote > Hi, I just build a winXP server that will function as my license Here is more info. The system is running Windows XP Pro SP2 and all> server at work running lmgrd from a mapped drive. Previously, when > running win2k server, I was able to create a local bat script and > setup a scheduled task to launch this bat script that will in turn > access the mapped drive with the application and licenses. This worked > fine until i switched over to Windows XP. Now my script fails to > access the mapped drive at startup. And when I manually run the > scheduled task, it will start but stop when I log off. > > So my question... Is there anyway for me to access a mapped drive in > XP at startup and run an application in the background. > > Here is my bat script: > > set DRIVE_LETTER=T: > > echo %DATE% %TIME% > C:\autoexnt.log > net use %DRIVE_LETTER% \\192.27.176.253\license /USER:administrator / > PERSISTENT:YES 2>> C:\autoexnt.log > echo %ERRORLEVEL% >> C:\autoexnt.log > > set hh=%time:~0,2% > if "%time:~0,1%"==" " set hh=0%hh:~1,1% > set yymmdd_hhmmss=%date:~10,4%%date:~4,2%%date:~7,2%_%hh%%time:~3,2% > %time:~6,2% > > set HOSTNAME=%COMPUTERNAME% > set LICENSE=Ansys > set LOG_NAME=%yymmdd_hhmmss%_%HOSTNAME%.log > > for %%i in (%LICENSE%) do %DRIVE_LETTER%\%%i\bin\lmgrd.exe -local -c > %DRIVE_LETTER%\%%i\license\license.dat -l %DRIVE_LETTER%\%%i\log\%%i- > %LOG_NAME% the necessary services are started. I can use the net use command after boot up to map the drive just fine. But when the task is scheduled to start at startup in the bat script, the net use command returns an error 67: "System error 67 has occurred. The network name cannot be found". <d_d***@my-deja.com> wrote in message
Show quoteHide quote news:1172620492.480548.290360@m58g2000cwm.googlegroups.com... That message means that the network has not been started at the time that > On Feb 27, 1:22 pm, d_d***@my-deja.com wrote: >> Hi, I just build a winXP server that will function as my license >> server at work running lmgrd from a mapped drive. Previously, when >> running win2k server, I was able to create a local bat script and >> setup a scheduled task to launch this bat script that will in turn >> access the mapped drive with the application and licenses. This worked >> fine until i switched over to Windows XP. Now my script fails to >> access the mapped drive at startup. And when I manually run the >> scheduled task, it will start but stop when I log off. >> >> So my question... Is there anyway for me to access a mapped drive in >> XP at startup and run an application in the background. >> >> Here is my bat script: >> >> set DRIVE_LETTER=T: >> >> echo %DATE% %TIME% > C:\autoexnt.log >> net use %DRIVE_LETTER% \\192.27.176.253\license /USER:administrator / >> PERSISTENT:YES 2>> C:\autoexnt.log >> echo %ERRORLEVEL% >> C:\autoexnt.log >> >> set hh=%time:~0,2% >> if "%time:~0,1%"==" " set hh=0%hh:~1,1% >> set yymmdd_hhmmss=%date:~10,4%%date:~4,2%%date:~7,2%_%hh%%time:~3,2% >> %time:~6,2% >> >> set HOSTNAME=%COMPUTERNAME% >> set LICENSE=Ansys >> set LOG_NAME=%yymmdd_hhmmss%_%HOSTNAME%.log >> >> for %%i in (%LICENSE%) do %DRIVE_LETTER%\%%i\bin\lmgrd.exe -local -c >> %DRIVE_LETTER%\%%i\license\license.dat -l %DRIVE_LETTER%\%%i\log\%%i- >> %LOG_NAME% > > > Here is more info. The system is running Windows XP Pro SP2 and all > the necessary services are started. I can use the net use command > after boot up to map the drive just fine. But when the task is > scheduled to start at startup in the bat script, the net use command > returns an error 67: "System error 67 has occurred. The network name > cannot be found". > > > > > > your batch file executed. With no network, the mapping cannot take place. Jim d_d***@my-deja.com wrote:
> So how do i start my network before starting my scheduled task? Have you tried using the Scheduled Tasks program? One of the options is > to run the program once the computer starts or when the user logs in. The delay may be enough for the network to have started before it is run. On Feb 27, 6:14 pm, "Michael W. Ryder" <_mwry***@worldnet.att.net> I need the task to start immediately upon boot up. this is a licensewrote: > d_d***@my-deja.com wrote: > > So how do i start my network before starting my scheduled task? > > Have you tried using the Scheduled Tasks program? One of the options is > to run the program once the computer starts or when the user logs in. > The delay may be enough for the network to have started before it is run. server, not a desktop. there will be no one logging into the machine. one thing i will try is to use the 'sleep' command that's provided in the windows resource kit. hopefully that'll stall launch of the app enough so that network services are started. I take it you know how to set autologon, and are using that?
AutoIt suggests itself for scripting the program start. This way you can: Ping the machine to ensure the network's up. Map the drive. Test the connection, and repeat if mapping wasn't successful. Sleep for a number of milliseconds. Run the program. http://www.autoitscript.com You could also do this with KixStart, though I prefer AutoIt. ok. placing a sleep 60 statement at the beginning of the bat script
allowed enough time for the network to come up. 'sleep' is available on the windows 2003 resource kit which works for xp: http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en thanks to everyone who contributed to this thread. i hope it helps others in the future.
Problem with Limited or No Connectivity on Wireless Lan Network
XP Computers won't talk to each other nor file share How to connect to a computer that has a Private IP ? Home networking with a wired and wireless network Home networking internet connection always lost. Failed to uninstall the device. Device may be required to boot up computer How do I "un-network" a PC? Problem Networking Xp Pro & XP Home Sharing a connection hp psc on a network |
|||||||||||||||||||||||