Page 1 of 1 1
Topic Options
#2386 - 2000-04-04 06:34 PM More @userid
Manimal Offline
Getting the hang of it

Registered: 2000-04-04
Posts: 96
Loc: Oregon City, OR. USA
I need to map a drive based on the results of @userid. I thought this would be simple but the silly thing doesn't work. Here's what I've got:

if @userid = "Chrisfri"
use z: "\\cfricke-nt\setup$"
endif

Am I doing something wrong? Should I be approaching this a different way?

------------------
Chris Fricke
Clackamas County

_________________________
Chris Fricke
Clackamas County

Top
#2387 - 2000-04-04 10:24 PM Re: More @userid
PaulMoxey Offline
Getting the hang of it

Registered: 1999-07-22
Posts: 90
Loc: Villawood, NSW, Australia
Try using a different name than Z:
By default, when a 95/98 machine authenticates, it maps z: (or the last available drive letter) to \\DomainController\netlogon for the duration of the login process.

Try using X: or Y:

------------------
Paul Moxey
POS & Senior Network Administrator
Taubmans Pty Ltd
Paul_Moxey@taubmans.com.au

_________________________
Paul Moxey POS & Senior Network Administrator BarloworldCoatings (AUST) Pty Ltd

Top
#2388 - 2000-04-05 11:09 AM Re: More @userid
Manimal Offline
Getting the hang of it

Registered: 2000-04-04
Posts: 96
Loc: Oregon City, OR. USA
That was a good point and I tried switching letters but still no go. I am trying on both Win98 and NT4.

Here is the actual code:

- Test.bat -

@echo off

NET TIME \\TBIRD /SET /YES

call %0%\..\kix32.exe map.kix
pause

- map.kix -

?@userid

if @userid = "Chrisfri"
use p: "\\cfricke-nt\setup$"
endif

sleep 3


- results -

The Batch file jumps into map.kix. The screen then displays my userid (which matches the name in quotes). It then seems to jump to the "sleep" command, goes back to the batch and "Pauses".

Can I even use the "USE" command like this? I thought this was going to be simple...

_________________________
Chris Fricke
Clackamas County

Top
#2389 - 2000-04-05 11:19 AM Re: More @userid
Anonymous
Unregistered


Hi

Try

%0%\..\kix32.exe %0%\..\map.kix
pause

- map.kix -

?@userid

if @userid = "Chrisfri"
use p: "\\cfricke-nt\setup$$"
endif

sleep 3

Hope this helps

------------------
Don Davidson
Network Engineer (alledgedly)
http://www.insight-media.co.uk

And my homepage http://www.nutrocker.co.uk/



Top
#2390 - 2000-04-05 11:31 AM Re: More @userid
Manimal Offline
Getting the hang of it

Registered: 2000-04-04
Posts: 96
Loc: Oregon City, OR. USA
Don is now my official hero for the day...

if @userid = "Chrisfri"
use p: "\\cfricke-nt\setup$$"
endif

worked!

Now I know to add the second "$" for hidden shares. Thanks a bunch!

On to the next issue...

_________________________
Chris Fricke
Clackamas County

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.088 seconds in which 0.064 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org