Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Windows Login script VBScript

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,45654
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Windows Login script VBScript
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Windows Login script VBScript - 4/10/2007 3:02:38 AM   
  yrizvi

 

Posts: 3
Score: 0
Joined: 4/10/2007
Status: offline
I have this batch file that i woud like to turn into vb script, but i just don't know some of the commands to complete my script

pls help!

My current logon batch file
 
@echo off
rem net use u: /home
net use p: \\server\packages
net use s: \\server\shared
net use w: \\server\shared
@start /max iexplore http://www.pc.com
@logoninfo.vbs
@echo on


THIS THE VB SCRIPT THAT I COMPLETED SO FAR
*********************************************
'Title: Windows Login script VBScript
'Description: Maps network drives for users
'*********************************************
on Error resume Next
set WshShl = Wscript.CreateObject("Wscript.Shell")
Set network = CreateObject("WScript.Network")
username = network.UserName
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "P:" , "\\Server\shared"
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "S:" , "\\Server\shared"
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "W:" , "\\Server\shared"
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "U:" , "\\server\"& username &""
 
 
Post #: 1
 
 RE: Windows Login script VBScript - 4/10/2007 3:04:38 AM   
  ebgreen


Posts: 4946
Score: 31
Joined: 7/12/2005
Status: offline
So it looks like you have probably figured out everything except for running the external apps. Search this forum for .Execute.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to yrizvi)
 
 
Post #: 2
 
 RE: Windows Login script VBScript - 4/10/2007 3:34:55 AM   
  yrizvi

 

Posts: 3
Score: 0
Joined: 4/10/2007
Status: offline
I am sorry, but i didn't understand what do you mean by search execute?

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Windows Login script VBScript - 4/10/2007 5:16:29 AM   
  dm_4ever


Posts: 2637
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
It is one of the methods for WScript.Shell - http://msdn2.microsoft.com/en-us/library/aew9yb99.aspx
Exec Method: http://msdn2.microsoft.com/en-us/library/ateytk4a.aspx
Run Method:  http://msdn2.microsoft.com/en-us/library/d5fk67ky.aspx

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to yrizvi)
 
 
Post #: 4
 
 RE: Windows Login script VBScript - 4/10/2007 6:36:41 AM   
  yrizvi

 

Posts: 3
Score: 0
Joined: 4/10/2007
Status: offline
Thank  you!!

I founded and it's working great!!

Yas

(in reply to dm_4ever)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Windows Login script VBScript Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts