Page 1 of 1 1
Topic Options
#168360 - 2006-09-25 02:00 PM Script Question
pimpjuice Offline
Fresh Scripter

Registered: 2006-09-25
Posts: 17
Loc: Fort Lauderdale, FL
Since Im new to KixTart arena here, I thought maybe someone out there might know how to add a Username and Password into a script. I am mapping a drive that needs a password. Here is the script.

If InGroup ("FLDAVKIXDap")
Use l: /Del
Use l: "\\FLDAVNAS02\data\dap" /user:fladomain\SVCNAS
EndIf

Top
#168361 - 2006-09-25 02:04 PM Re: Script Question
Björn Offline
Korg Regular
*****

Registered: 2005-12-07
Posts: 953
Loc: Stockholm, Sweden.
Heyya, and welcome to the board.
This states quite clear in the reference :
Code:

USE E: "\\SERVER\PUBLIC" /user:Yogi /password:Bear


Top
#168362 - 2006-09-25 02:05 PM Re: Script Question
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
From the manual
Quote:


USE
Action


Connect, disconnect or list network connections.



Syntax


USE LIST

USE <* | "device" | "resource"> /DELETE [/PERSISTENT]

USE ["device"] <"resource"> [/USER:user] [/PASSWORD:password] [/PERSISTENT]



Remarks


Use USE "*" /DELETE to delete all current connections except those to a NETLOGON share and those to the drive or share from which KiXtart was started.



If a resource name contains non-alphanumeric characters (such as - or +), enclose the name in quotation marks.



On Windows NT or higher only, the /USER and /PASSWORD parameters enable overriding the security context of the current user.



Check the value of @ERROR to see if USE was successful (a value of 0 indicates success).

The "USE *" syntax enables you to redirect the first available drive to a resource. If redirection is successful, @RESULT will contain the driveletter of the redirected drive.



Examples


USE E: "\\SERVER\PUBLIC" /PERSISTENT



USE * /DELETE



USE E: "\\SERVER\PUBLIC" /user:Yogi /password:Bear



USE E: "\\SERVER\PUBLIC"



USE LPT1: "\\SERVER\LASER" /user:testlan\USER1



USE L: /DEL



USE LIST



USE * @HOMESHR ; connect any drive to user's home share

IF @ERROR = 0

? "Connected " + @RESULT + " to home share…"

ENDIF



USE H: @HOMESHR ; connect to user's home share

IF @ERROR = 0

H: ;

CD @HOMEDIR ; change directory to user's home directory

ENDIF





Top
#168363 - 2006-09-25 02:08 PM Re: Script Question
pimpjuice Offline
Fresh Scripter

Registered: 2006-09-25
Posts: 17
Loc: Fort Lauderdale, FL
Hey you guys rock!!!!!!

Entered the sytax into the script and it worked just fine. Thank-you guys - Take Care.!!!

Top
#168364 - 2006-09-25 07:13 PM Re: Script Question
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
FYI

It is KiXtart not KixTart

Placing a password in a script goes against all best practice methods for security.
You should attempt to manage this requirement in another manner if at all possible.

Top
#168365 - 2006-09-25 09:37 PM Re: Script Question
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Well, I can help you make a KixTart
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 857 anonymous users online.
Newest Members
JimDunn, fgarcia, Viginette, ManuvdWielNL, Sir_Barrington
17890 Registered Users

Generated in 0.048 seconds in which 0.024 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