Jaide
(Fresh Scripter)
2003-03-05 09:27 PM
Mapping Drive & Choices

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


Sealeopard
(KiX Master)
2003-03-05 09:30 PM
Re: Mapping Drive & Choices

code:
IF NOT INGROUP('Administrators')
; map drives
ENDIF



Jaide
(Fresh Scripter)
2003-03-05 09:40 PM
Re: Mapping Drive & Choices

That function will not map drives for users who are not part of the Administrators group?

Jose
(Seasoned Scripter)
2003-03-05 10:34 PM
Re: Mapping Drive & Choices

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 ]


ShaneEP
(MM club member)
2003-03-06 01:43 AM
Re: Mapping Drive & Choices

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 ]


Jaide
(Fresh Scripter)
2003-03-06 02:36 PM
Re: Mapping Drive & Choices

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?

Sealeopard
(KiX Master)
2003-03-06 04:59 PM
Re: Mapping Drive & Choices

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 ]