Interesting.  I was fairly certain that the DHCPRELEASEALL method in WMI is 
documented that user's have sufficient privilege.

Some research indicates that you can force your desired behavior at the DHCP 
server - for Win2K Clinets anyway.
Take a look at
http://www.microsoft.com/windows2000/en/server/help/default.asp?url=/windows2000/en/server/help/sag_DHCP_add_OptionsMsVendorSpecific.htm

(URL will wrap)



Otherwise make your users Power users and try this (untested code - you find 
the typos and other errors if there are any.)

'********************************
'Name : DHCPRELEASE.VBS
'
' Usage: CSCRIPT.EXE //nologo dhcprelease.vbs
'
' Purpose : To release DHCP leases on all bound network adapters
'
' Author : Patrick R. Sweeney
'          10/25/2001
'          [EMAIL PROTECTED]
'
' Support: None.
'
' Disclaimer: This code is provided as is, without warranty
'             implied or otherwise.  Use is at your own risk.
'             The author will not be held accountable for
'             issues and errors arising from the use of this code.
'************************************************

Option Explicit
On Error Resume Next

'************
'** Declare Variables
Dim oNICConfigs   'Object representing the network adapters
Dim lRetVal       'Return value
Dim sMessage      'String message to echo to user

'***********
'** Initialize variables
Set oNICConfigs = _
GetObject("WinMgmts:Win32_NetworkAdapterConfiguration")


'***********
'** Release All DHCP Leases
lRetVal = oNICConfigs.DHCPReleaseAll

'***********
'** Evaluate the result
'** lRetVal of 0 indicates success

if lRetVal = 0 then
'** Probably do nothing - here's an example anyway
sMessage = "DHCP Lease successfully released."
else
'** log an event, or pop a message, or send an alert
'** whatever is appropriate
sMessage = "DHCP Lease not released successfully" & vbCRLF
sMessage = sMessage & "This may cause issues with VPN Access." & _
            vbCRLF
sMessage = sMessage & "The error was " & CStr(lRetVal) &_
            ": " & err.Description
'I'm not certain that last bit will work -
'using lretVal the err.description.
'It's a bit of a mixed metaphor
end if

'*********
'** Display result for the end user
WScript.Echo sMessage


'**********
'** Cleanup
set oNICConfigs = Nothing

'**************End of Script**************


Then create a 1 line batch file with
cscript.exe //nologo dhcprelease.vbs

As an alternative to making your users power users you could use RunAS.  
That would entail saving the password for a power user or local admin in a 
clear text file.  I find that more unsavory.

----Original Message Follows----
From: "Jeff" <[EMAIL PROTECTED]>
Reply-To: "NT 2000 Discussions" <[EMAIL PROTECTED]>
To: "NT 2000 Discussions" <[EMAIL PROTECTED]>
Subject: Permissions on IPCONFIG Windows 2000
Date: Thu, 25 Oct 2001 09:48:19 -0400

Looks like you need to be at least a power user to run IPCONFIG /Release or
Renew under Windows 2000.  Does anyone know of a way to grant rights to
allow users to run IPCONFIG / Release and Renew.  I really do not want to
add general users to that group if I can help it.



_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


------
You are subscribed as [email protected]
Archives: http://www.swynk.com/sitesearch/search.asp
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to