Page 1 of 1 1
Topic Options
#12049 - 2001-09-01 01:59 AM Kinda works, but doesn't. :)
Anonymous
Unregistered


I have added a peice to my login script that says the following:

; Disallow connect / disconnect of network drives
If InGroup("Information Systems") = 0
WriteValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer", "NoNetConnectDisconnect", "0", "REG_DWORD")
EndIf

As it says it is supposed to disable the users ability to connect / disconnect network drives - unless you are in group "Information Systems". The value 1 (enabled) and 0 (disabled) or supposed to be used. Now, it does write the key correctly to the correct spot when you are not in the specified group (which is good). However it does not do anything, it doesn't disallow the ability to connect / disconnect network drives. I've tried both a 1 and a 0 in for the value.

~Ryan

Top
#12050 - 2001-09-01 02:22 AM Re: Kinda works, but doesn't. :)
Anonymous
Unregistered


I think my problem with the above question has to do with the value name "NoNetConnectDisconnect" Cause I followed the same procedure with another key called NoRun to disable Run from the start menu, and that one suceeded at having it's effect.

~Ryan

Top
#12051 - 2001-09-01 02:31 AM Re: Kinda works, but doesn't. :)
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
In what context are you testing it? THe RK Reg Guide states:
quote:

NoNetConnectDisconnect
HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer

Data type Range Default value
REG_DWORD 0 | 1 0

Description
Prevents users from using Windows Explorer or My Network Places to map or disconnect network drives.

This entry stores the setting of the Remove "Map Network Drive" and "Disconnect Network Drive" Group Policy. Group Policy adds this entry to the registry with a value of 1 when you enable the policy. If you disable the policy or set it to Not configured, Group Policy deletes the entry from the registry and the system behaves as though the value is 0.

Value Meaning
0 (or not in registry) The policy is disabled or not configured. Users can map and disconnect network drives.
1 The policy is enabled. Users cannot map or disconnect newtork drives.

A value of 1 removes the Map Network Drive and Disconnect Network Drive commands from the toolbar and Tools menus in Windows Explorer and My Network Places and from menus that appear when you right-click the Windows Explorer or My Network Places icons. It also removes the Add Network Place option from My Network Places.

This policy does not prevent users from connecting to another computer, such as by typing the name of a shared folder in the Run dialog box


_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#12052 - 2001-09-01 03:04 AM Re: Kinda works, but doesn't. :)
Anonymous
Unregistered


That is exactly how I am using it, but it just isn't have the effect. I am testing it on a Windows 95 box and a test user account. I can successfully disable the Run command from the Start Menu, and the MS-Dos prompt using the same method. Method being that I have just put the lines to add the registry entries straight into the script. For some reason with NoNetConnectDisconnect the menus to add and remove network drives are still accessiable. Any ideas to try? I won't be back working on this until Tuesday after the long weekend.

~Ryan
ryanl@nlc.ca

Top
#12053 - 2001-09-05 01:43 AM Re: Kinda works, but doesn't. :)
Anonymous
Unregistered


I think I figured it out. I can't do it cause the NoNetConnectDisconnect can only be used on Windows NT, and I was trying on Win 9x / 2000 platforms. Anyone know of a way to disable the Map Network Drive and Disconnect Network Drive options in Win 9x and 2k?

~Ryan

Top
#12054 - 2001-09-05 03:03 AM Re: Kinda works, but doesn't. :)
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I tried the reg hack and it worked on Win2k. You need to logoff / logon for it to stick. I haven't a Win95 machine to try it on.
Perhaps with Win95 the problem could be with the fact the HKCU may not be available during logon. You may need to stuff in RunOnce.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#12055 - 2001-09-05 04:08 PM Re: Kinda works, but doesn't. :)
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Meanwhile, back at the office... I gave this a little more thought.
One thing I noticed in your first post is you were writing the value of 0 instead of 1.
In my last post, I said you had to logoff / logon. Now I'm not so sure. May in fact need a reboot.
I dusted off an old '95 laptop here and tried it but couldn't get it to work.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#12056 - 2001-09-06 01:41 AM Re: Kinda works, but doesn't. :)
Anonymous
Unregistered


Yeah.. it didn't take me long to see my initial mistake of the 0 instead of 1. But even after that, the restriction failed to implement. I do know that it is not a problem accessing the HKCU durning boot up as a few other restrictions use the same key to issue restrictions and they have worked. Plus I have also gone into the regedit on my test machine to find that it has indeed written the value to the key. However, I never have tried a complete reboot of the system and log in to see if that might work. Think I'll give that a shot right now.
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 640 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.058 seconds in which 0.023 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