home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!wupost!wuvmd!c09615bt
- From: C09615BT@WUVMD (Brad Thone)
- Newsgroups: comp.sys.novell
- Subject: Re: Login Script Variables > DOS Environmental Variables
- Message-ID: <92233.221855C09615BT@wuvmd.wustl.edu>
- Date: 21 Aug 92 04:19:18 GMT
- References: <4682@news.duke.edu>
- Organization: Washington University, St. Louis
- Lines: 45
- To: NETNEWS@WUVMD
-
- I have a tiny program called NETDRIVE.COM that a friend gave to me.
-
- Type NETDRIVE and presto! You are instantly logged to the first
- network drive (usually, but not always) F:.
-
- Using a batch file, you could pretty easily set an environment variable
- to the first net drive.....
-
- ------------- Begin FIRSTNET.BAT -----------------------
- @ECHO OFF
- REM Set env var FIRSTNET to first logical network drive
- F:LOGINNETDRIVE
- CD
- COPY C:NETFILE1.TXT C:NETSETVAR.BAT
- CD >> SETVAR.BAT
- SETVAR
- --------------- End FIRSTNET.BAT --------------------------
- -------------- Begin FILE1.TXT ----------------------------
- @SET FIRSTNET=
- --------------- End FILE1.TXT ------------------------------
-
- SPECIAL NOTE! FILE1.TXT must NOT contain a carriage return!
- Creat FILE1.TXT by typing this exactly as I describe....
- At the DOS prompt: type COPY CON FILE1.TXT and hit <RETURN>
- At the cursor: type @SET FIRSTNET= and hit <Ctrl-Z>
- (note: there is NO space after the equal sign)
- At the ^Z displayed: hit <RETURN>
-
- I would recommend making FILE1.TXT readonly then.
- (Of course, FILE1.TXT is a stupid name. Rename it....)
-
- One small drawback to this is that if your first network drive
- is F: then FIRSTNET=F: (with the backslash)
- Maybe that matters, maybe not.
- A recent issue of PCWorld published a batch file that would let you
- do string manipulation using DOS environment variables and DOS commands....
-
- Let me know if you want the NETDRIVE.COM....
- I'll UUEncode it.
-
- Note: The above batch files have never been tried by me. I just made
- them up. No reason why they won't work though.
-
- Bon chance!
- Brad Thone
-