Results 1 to 5 of 5

Thread: VB logon script

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    2

    VB logon script

    I am currently using the script below as a logon script mapping the network drives for the user and displaying a pop up box displaying the user name and the group policy:

    Option Explicit

    Dim objNetwork, strRemotePath1, strRemotePath2, strRemotePath3, strRemotePath4, strRemotePath5, strRemotePath6

    Dim strDriveLetter1, strDriveLetter2
    Dim strDriveLetter3, strDriveLetter4
    Dim strDriveLetter5, strDriveLetter6

    'P = Map Personnal Storage
    'F = Map File Server
    'M = Map Frontline data
    'Z = Map Safety Orginser data
    'T = Map Cobol data
    'S = Map CMS data

    strDriveLetter1 = "P:"
    strDriveLetter2 = "F:"
    strDriveLetter3 = "M:"
    strDriveLetter4 = "Z:"
    strDriveLetter5 = "T:"
    strDriveLetter6 = "S:"

    strRemotePath1 = "\\410\joe.blogs"
    strRemotePath2 = "\\400\joe.blogs"
    strRemotePath3 = "\\Front\data"
    strRemotePath4 = "\\410\Safety"
    strRemotePath5 = "\\Frontl\cobol"
    strRemotePath6 = "\\400\cms"

    Set objNetwork = CreateObject("WScript.Network")

    objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1
    objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2
    objNetwork.MapNetworkDrive strDriveLetter3, strRemotePath3
    objNetwork.MapNetworkDrive strDriveLetter4, strRemotePath4
    objNetwork.MapNetworkDrive strDriveLetter5, strRemotePath5
    objNetwork.MapNetworkDrive strDriveLetter6, strRemotePath6

    WScript.Echo "Hello Joe Blogs welcome to my corp, this is the group policy"


    Wscript.Quit


    I have been asked to add to this script and appear the users name, the machine name, ip address and time that the user has logged in at to a file stored somewhere on the application server.

    Please can someone help. Have already attempted it, but to no avail.

    Thanks

  2. #2

    Thread Starter
    New Member
    Join Date
    Jul 2006
    Posts
    2

    Re: VB logon script

    please help. could be finacially rewarding

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: VB logon script

    Quote Originally Posted by uncle gimoah
    Have already attempted it
    Maybe if you posted the code you tried?
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  4. #4
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    Re: VB logon script

    The above would probably be easier use just normal batch file logon scripts.
    Why not turn on security auditing for logons? The user doesn't need to know their own hostname or IP address... they especially don't need to know their IP if the network is using DHCP.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  5. #5
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: VB logon script

    Might get better answers in an admin forum or site catering to administration issues. Most programmers aren't so interested in this sort of topic.

    I have some interest in VBScript myself for example, but not for administration. This seems to be more of a programmer's forum about Visual Basic, not so much VBScript.

Posting Permissions

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



Click Here to Expand Forum to Full Width