Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Puffin Rock Characters Plush Toy Set
anil1961
Updated:
Nov 7, 2026
Toyota Vitz scp10 For Sale
Lakmal Bandara
Updated:
Nov 4, 2026
Kandy
Welcome all my all new pet shop Bark.lk
dilumrane
Updated:
Nov 2, 2026
Windows RDP Only Rs.500 a month
Blogerwiki
Updated:
Nov 1, 2026
Ad icon
V2ray VPN for Tunneling
hu KANNA
Updated:
Oct 22, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Help
meke tiyana waradda mokakda.(NetWORKING)
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="romero2005" data-source="post: 4758850" data-attributes="member: 3944"><p><span style="font-family: 'Franklin Gothic Medium'"><span style="font-size: 15px"><span style="color: DimGray">Map a network drive to the User name</span></span></span></p><p></p><p><span style="font-size: 10px"><span style="color: DarkRed">Option Explicit</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">Dim objNetwork</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">Dim strDriveLetter, strRemotePath, strUserName</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">strDriveLetter = "J:"</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">strRemotePath = "\\Server\home"</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">' Purpose of script to create a network object. (objNetwork)</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">' Then to apply the MapNetworkDrive method. Result J: drive</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">Set objNetwork = WScript.CreateObject("WScript.Network")</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">' Here is where we extract the UserName</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">strUserName = objNetwork.UserName</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">objNetwork.MapNetworkDrive strDriveLetter, strRemotePath _</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">& "\" & strUserName</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed"></span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">' Extra code just to add a message box</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">WScript.Echo " Launch Abel Training, Welcome to ABEL Training Service check: "& strDriveLetter</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed">WScript.Quit</span></span></p><p><span style="font-size: 10px"><span style="color: DarkRed"></span></span></p><p><span style="color: DarkGreen"><span style="font-size: 15px"><span style="font-family: 'Franklin Gothic Medium'"></span></span></span></p><p><span style="color: DarkGreen"><span style="font-size: 15px"><span style="font-family: 'Franklin Gothic Medium'">Mage Server name eka "Server" Shared file eka "home" THis is for my final Project.</span></span></span></p></blockquote><p></p>
[QUOTE="romero2005, post: 4758850, member: 3944"] [FONT="Franklin Gothic Medium"][SIZE="4"][COLOR="DimGray"]Map a network drive to the User name[/COLOR][/SIZE][/FONT] [SIZE="2"][COLOR="DarkRed"]Option Explicit Dim objNetwork Dim strDriveLetter, strRemotePath, strUserName strDriveLetter = "J:" strRemotePath = "\\Server\home" ' Purpose of script to create a network object. (objNetwork) ' Then to apply the MapNetworkDrive method. Result J: drive Set objNetwork = WScript.CreateObject("WScript.Network") ' Here is where we extract the UserName strUserName = objNetwork.UserName objNetwork.MapNetworkDrive strDriveLetter, strRemotePath _ & "\" & strUserName ' Extra code just to add a message box WScript.Echo " Launch Abel Training, Welcome to ABEL Training Service check: "& strDriveLetter WScript.Quit [/COLOR][/SIZE] [COLOR="DarkGreen"][SIZE="4"][FONT="Franklin Gothic Medium"] Mage Server name eka "Server" Shared file eka "home" THis is for my final Project.[/FONT][/SIZE][/COLOR] [/QUOTE]
Insert quotes…
Verification
Hath warak paha keeyada? (hatha wadikireema paha)
Post reply
Top
Bottom