vbscript >> How to find out LOGONSERVER with VBScript

by Wensi Peng » Wed, 03 Dec 2003 07:48:42 GMT

How to find out LOGONSERVER on remote XP clients?


vbscript >> How to find out LOGONSERVER with VBScript

by Alex » Thu, 04 Dec 2003 23:07:20 GMT


I guess you should read the key HKCU\VolatileEnvironment\Logonserver
through WMI.


"Wensi Peng" < XXXX@XXXXX.COM > a rit dans le message de

vbscript >> How to find out LOGONSERVER with VBScript

by StevieRay » Tue, 09 Dec 2003 04:51:27 GMT

Get the logonserver variable from the command shell. (Type SET).


Similar Threads

1. Finding the LogonServer on PC bootup?

I want to run a Startup vbscript for each machine in an OU.  I'm running 
into a problem finding out what DC the PC is connecting to when it boots up. 
I know when a user logs in, I can get the environment variable 
%LOGONSERVER%, but this does not work with the PC Startup script.  I guess 
it's not defined yet.

Is there another way to find out which DC the PC is talking to when it boots 

If a file does not exist on the PC, I want to copy it down from the closest 
DC's NETLOGON folder.  (Trying to prevent any unnecessary WAN traffic)

If you have any advice, I'd love to hear it.


Jason Rosolowski
Systems Manager - Hospital Division
Noland Health Services
Birmingham, AL 

2. Gray outs - VB.Net

3. Drawer-like slide-outs

Does anyone know of a way to mimic the drawer-like effects found in Windows
Media Player?  Specifically, how when you click on some of the buttons of a
skin, things like the equalizer, or song information "drawer" slides out of
the main application window?

Are there any OCX's out there to do this?  Any code samples?  Anything?



4. Network Username in Print Outs - Word VBA

5. GetSetting LOGONSERVER?


Could anyone help me with how to get/set registry key/value for LOGONSERVER?

I need help reaching LOGONSERVERregistry key and its value. I am aware how 
Set/GetSetting function works

Public Function GetSetting(ByVal AppName As String, ByVal Section As String, 
ByVal Key As String, Optional ByVal Default As String = "") As String

I used the function many times for my own applications, but never to reach 
some Windows/System key. When I search the registry for LOGONSERVER I find 
it in the following section:

[HKEY_CURRENT_USER\Volatile Environment]

Could anyone help me with how to get/set value for LOGONSERVER?

Thanks in advance
Strah @ Langan

6. Startup script, alternative to %LogonServer%?

7. need to use %logonserver% not unc please help

Hi i hope you can help I can't get this script to work using the logons 
server netlogon share however if i replace the source string with a full UNC 
path the script works can anyone help me correct this thanks

dim strSource, strDestination
strSource = %logonserver%\netlogon\logo\
strDestination = "c:\windows\system32\logo\"

SynchroniseFiles strSource, strDestination

function SynchroniseFiles(byval strSourceFolder, byval strDestinationFolder)

	CheckForBackSlash strSourceFolder
	CheckForBackSlash strDestinationFolder
	dim objFSO
	set objFSO = Createobject("scripting.filesystemobject")
	if not objFSO.folderexists(strDestinationFolder) then
	end if

	dim file
	for each file in objFSO.getfolder(strSourceFolder).files
		if not objFSO.fileexists(strDestinationFolder & file.name) then
			objFSO.copyfile file, strDestinationFolder & file.name
			if file.DateLastModified > objFSO.getfile(strDestinationFolder & 
file.name).DateLastModified then
				objFSO.copyfile file, strDestinationFolder & file.name
			end if
		end if

	set objFSO = nothing

end function

function CheckForBackSlash(byref strFolder)
	if right(strFolder, 1) <> "\" then
		strFolder = strFolder & "\"
	end if
end function

8. Domain Logonserver