Page 1 of 1 1
Topic Options
#73890 - 2003-03-05 09:27 PM Mapping Drive & Choices
Jaide Offline
Fresh Scripter

Registered: 2003-03-05
Posts: 32
I have a script that maps drive for members of the Administrators group. I want to add a option in the script that allows Administrators to bypass mapping of a set of drives during the script execution. I only want to allow this function to the Administrator group. Is this easy to implement?

Thanks

Top
#73891 - 2003-03-05 09:30 PM Re: Mapping Drive & Choices
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
code:
IF NOT INGROUP('Administrators')
; map drives
ENDIF

_________________________
There are two types of vessels, submarines and targets.

Top
#73892 - 2003-03-05 09:40 PM Re: Mapping Drive & Choices
Jaide Offline
Fresh Scripter

Registered: 2003-03-05
Posts: 32
That function will not map drives for users who are not part of the Administrators group?
Top
#73893 - 2003-03-05 10:34 PM Re: Mapping Drive & Choices
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
Hi Jaide uts up [Wink] .
What Jens is suggesting is more a condition than a function.

Here you can see what a function is.

Have u got the manual? There you can find the answer for all of your questions.
Good luck.

[ 06. March 2003, 01:33: Message edited by: jose3 ]
_________________________
Life is fine.

Top
#73894 - 2003-03-06 01:43 AM Re: Mapping Drive & Choices
ShaneEP Moderator Offline
MM club member
*****

Registered: 2002-11-29
Posts: 2125
Loc: Tulsa, OK
You mean something like this? So only Admins have the option to skip drive mapping?

code:
 
If Ingroup ("Administrators")
$mapconfirm = messagebox ("Do you want to map drives?","Map?",36)
If $mapconfirm = "6"
? 'Mapping drives'
; Drive Mapping Code Here <-- PUT YOUR DRIVE MAPPING CODE HERE
Else
? 'Drive Mapping Skipped'
Endif
Endif



[ 07. March 2003, 00:50: Message edited by: CitrixMan ]

Top
#73895 - 2003-03-06 02:36 PM Re: Mapping Drive & Choices
Jaide Offline
Fresh Scripter

Registered: 2003-03-05
Posts: 32
If I answer YES to the dialog box, the login script skips the drives I need mapped under 'Mapping Drives'. Is there some code I missing?
Top
#73896 - 2003-03-06 04:59 PM Re: Mapping Drive & Choices
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
You will still have to put this into your script yourself. We're just showing you different options to accomplish what you're asking for. Writing the real code is still up to you.

[ 06. March 2003, 17:00: Message edited by: sealeopard ]
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.156 seconds in which 0.123 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