+ Reply to Thread
Results 1 to 2 of 2

Thread: What is the logon script to check logon server?

  1. #1
    Member
    Join Date
    Oct 2008
    Posts
    76

    Post What is the logon script to check logon server?

    I want to run a logon script for checking the logon server name. Based on logon server, user should run the command. Is it possible to write the script? Can anyone provide me the script?

  2. #2
    Administrator prashant's Avatar
    Join Date
    Aug 2008
    Posts
    1,363

    Default

    Yes. It is possible to run the script. You should run the batch file for logon script. Below is the command to check the logon server:

    set logonserver

    If you run this command in the Command Prompt, it display something like: LOGONSERVER=\\<servername>

    Based on the logon server, you can use the IF ELSE condition and GOTO condition in the script. Below is the sample script:

    Code:
    if not /i "%LOGONSERVER%"=="\\DC1" goto else
    then [put commands here for DC1]
    goto endif
    :else
    [put commands here for DC2]
    :endif
    Change the above script as per your needs.

+ Reply to Thread

Similar Threads

  1. Opening Windows by using Java script in HTML
    By moderntech in forum Graphics
    Replies: 0
    Last Post: 11-27-2008, 11:02 AM
  2. Check Buttons in GUI Programming
    By flower in forum Programming
    Replies: 0
    Last Post: 11-05-2008, 10:25 AM
  3. Using a specialized script editor
    By crazy4 in forum Programming
    Replies: 0
    Last Post: 11-03-2008, 10:21 AM
  4. Using PSExec to execute a script on a remote machine
    By sword in forum Operating systems
    Replies: 0
    Last Post: 10-07-2008, 11:00 AM
  5. Check the Windows Vista Experience Index
    By madhusudhan in forum Windows Vista
    Replies: 0
    Last Post: 08-18-2008, 12:00 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

LinkBacks Enabled by vBSEO