Tezz,

Shell ("%comspec% /c Net Use .. ")

Or

Use ..


You can do exactly the same with the KiXtart Use command !

BUT whatever you choose to use, you have to expose the password in plan text !!


From the KiXtart manual:

----------------------------------------------------------------------------------------------------

Command: Use

Action:
Enables you to list the current connections.
Also enables you to connect a device, such as a drive or a printer, to a network resource or
to disconnect a device from a network resource.

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 +), you must enclose the name in quotation marks.

On Windows NT only, you can use the /USER and /PASSWORD parameters,
which allows you to override the security context of the current user.

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

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 H: @HOMESHR ; connect to user's home share
IF @ERROR = 0
H:
CD @HOMEDIR ; change directory to user's home directory
ENDIF

----------------------------------------------------------------------------------------------------

As you can see the KiXtart Use command is capable of doing the same as Net Use


You can get the 'online' manual from here:
HTML Help file from ScriptLogic

Just another way of telling you: LOOK IN THE MANUAL


-Erik

[ 11 December 2001: Message edited by: kholm ]