Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Local file exist test in login script? 1

Status
Not open for further replies.

michaeljay

Vendor
Aug 1, 1999
4
0
0
US
I'm trying to deal with Managewise 2.6 client deployment on a less than well-cared for multisite NW4 network, and am looking for a quick workaround to branch around the standard Managewise client login script commands for a variety of Windows 95 & DOS machines. <br>
<br>
I would like to test for the presence of the Managewise file C:\Windows\Wincfg.txt, and remember being shown a trick for doing this from a Netware login script some time ago -- but cannot recall how! The alternative approach of adding a DOS environment variable to AUTOEXEC.BAT works, but depends on the rollout team to keep this variable updated when Managewise is installed / removed.<br>
<br>
Thanks in advance for any suggestions! Michael Johnson
 
I do not recall the Novell login command, but for DOS:<br>
<br>
Instead of putting in the autoexec.bat file...<br>
1. have the autoexec.bat CALL f:\login\mgwtest.bat<br>
<br>
This file can update or copy work stations automatically.<br>
While you still need to update the variable, you only need<br>
to do it from one spot.
 
Thanks for the suggestion! <br>
<br>
Unfortunately, SYS:LOGIN on our Managewise server does not have the MGWTEST.BAT file. Also, I am looking for a way to *avoid* an automatic install on the machines we have found that GPF or freeze when WUSER.EXE is loaded.
 
Hope this is what you are looking for.<br>
<br>
Call a batch file from your login script that includes the dos commands that check for file existance. Errrm, I think is goes something like<br>
<br>
IF EXIST volume:\directory\subdirectory\file.txt<br>
THEN<br>
.<br>
.<br>
.<br>
ELSE<br>
.<br>
.<br>
.<br>
<br>
<br>
<br>
<br>

 
Also thank you, Jgrain -- but unfortunately, Netware's login script language does not seem to include a conditional test for file existence. <br>
<br>
Running a DOS batch file from the login script is not a problem, so (major kludge follows) I could set the environment variable with a DOS batch file, then test for it in Netware ...<br>
<br>
; Netware script<br>
; Batch file SEEKER.BAT tests for presence of<br>
; Managewise hidden flag file C:\Windows\Wincfg.txt<br>
; and sets DOS environment variable MWHERE <br>
<br>
#F:\MWSEEKER.BAT<br>
<br>
; Managewise setup utility runs only if <br>
; -- Managewise is already installed<br>
; -- user has set a Client 32 login flag<br>
<br>
IF &lt;MWHERE&gt;="YES" OR %4="I" THEN<br>
<br>
; run Managewise setup/registration utility<br>
....<br>
END<br>
<br>
-------<br>
SEEKER.BAT<br>
--------<br>
C:\Windows\Command\winset MWHERE="YES"<br>
IF NOT EXIST C:\Windows\Wincfg.txt GOTO NOMW<br>
C:\Windows\Command\winset MWHERE="NO"<br>
:NOMW<br>
^Z<br>
<br>
Problem with this approach, though, is a slow login script, same kind of difficulty that DOS batch files have during MS Net logons. <br>
<br>
Netware scripting does provide for ERRORLEVEL processing ... another avenue, but again one I would rather avoid for concern over script processing speed/ thruput. Best would be a utility that returns a character string I can test by direct comparison.
 
Michael,<br>
<br>
I see that the last response on this thread is about a month old, but I thought I would pass on a bit of info anyway.<br>
<br>
In the 08/23 issue of Network Computing, there is an article on using NAL to distribute apps. The article mentions the scripting capabilities of NAL when used with a 3rd party scripter (they liked WINBatch). The author used this very example of testing for the existence of a file date prior to, in this case, installing a program using NAL.<br>
<br>
You can probably catch this article ('Getting the Directory to Deliver') at Network Computing's website <br>
Regards,<br>
<br>
Jim
 
Jim, on target! Thank you ... the article also talks about rolling out DHCP, which will be a big help.<br>
<br>
Again, many thanks.<br>
<br>
Michael J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top