|
-
Jul 25th, 2006, 03:38 AM
#1
Thread Starter
New Member
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
-
Jul 31st, 2006, 05:02 AM
#2
Thread Starter
New Member
Re: VB logon script
please help. could be finacially rewarding
-
Jul 31st, 2006, 08:56 PM
#3
Re: VB logon script
 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
-
Aug 1st, 2006, 02:56 AM
#4
Retired VBF Adm1nistrator
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]
-
Aug 3rd, 2006, 07:18 AM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|