Page 1 of 1 1
Topic Options
#52686 - 2000-12-11 05:25 PM Connecting to network drive as another user
Anonymous
Unregistered


Hello BB,

Thanks for all of the previous help. I will be getting updates to previous posts up today.
The problem I am currently having is this.

I am currently using INGROUP to map certain drives.Ex:

IF INGROUP("Nautilus")=1
Use N: "\\NAUTILUS01\NAUTILUS"
ENDIF

The problem is, the drive is in an untrusted domain. We have established a user account in the domian, and would like all users in this group to map this drive connecting to this resource as a certain user.

I have tried :

IF INGROUP("Nautilus")=1
Use N: "\\NAUTILUS01\NAUTILUS /U:Localmachine\user password"
ENDIF

But it is not working. Any help would be great.

My other question is how do you import a exported registry file using kix. I have a .reg file that I need to import for the same group of users.

All help is greatly appreciated.

Thanks,

Judd

Top
#52687 - 2000-12-11 05:33 PM Re: Connecting to network drive as another user
Anonymous
Unregistered


Looks like you will have to shell out:

SHELL "%COMSPEC% /C NET USE Q: \\SERVER\SHARE /U :DOMAIN\USERNAME"

Also remember, Windows 9x does not understand /U:

As far as the REG, you can also shell out:

SHELL "%COMSPEC% /C REGEDIT /S REGFILE.REG"

You may have to specify the location of regedit (i.e. %WINDIR%\REGEDIT.EXE) if your path is messed up.
------------------
Jesse
------------------
For more scripting help and examples, click here.

[This message has been edited by Elvis2000 (edited 11 December 2000).]

Top
#52688 - 2000-12-11 05:46 PM Re: Connecting to network drive as another user
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
No need to shell out, kix's USE command will do what you want.

use "\\server\share" /user:'$domain\$user' /password:$password

Be sure to set the variables, $domain,
$user, and $password

Bryce

Top
#52689 - 2000-12-11 05:46 PM Re: Connecting to network drive as another user
Anonymous
Unregistered


That works great Jesse.

How can I suppress the confirmation?

"The command completed succesfully"

Let me try Bryces way and see how that works.

Thanks!

[This message has been edited by Judd_Spence (edited 11 December 2000).]

Top
#52690 - 2000-12-11 07:45 PM Re: Connecting to network drive as another user
Anonymous
Unregistered


Thanks Bryce, everything works perfectly now.

For the .Reg import, I am getting the error:

Error opening file. There may be a disk or file error. Here is my script. The NautilusNT.Reg file is located in the netlogon share of all DC's.

Any ideas? Here is what I am using-

IF INGROUP("Nautilus")=1
use N: "\\NAUTILUS01\NAUTILUS" /user:'machine\user' /password asswd
SHELL "%COMSPEC% /C REGEDIT /S NautilusNT.REG"
ENDIF

[This message has been edited by Judd_Spence (edited 11 December 2000).]

Top
#52691 - 2000-12-11 08:30 PM Re: Connecting to network drive as another user
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
use this.

SHELL "%COMSPEC% /C REGEDIT /S %0\..\NautilusNT.REG"

Bryce

Top
#52692 - 2000-12-12 02:57 PM Re: Connecting to network drive as another user
Anonymous
Unregistered


Remeber:
You can suppress most DOS (shell) returns by redirecting the output to a NUL device.
Example:
NET USE * \\SERVER\SHARE > NUL

------------------
Jesse
------------------
For more scripting help and examples, click here.

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
0 registered and 384 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.059 seconds in which 0.014 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