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
🔒 NordVPN Premium – 3 Months
hrdilshan
Updated:
Thursday at 8:29 PM
🚀 Microsoft Office 365 Pro Plus – Lifetime Access! 🚀
hrdilshan
Updated:
Thursday at 8:28 PM
Linkedin Premium Business / Careere /Sales Navigator - 1/2/3/6/9/12 Months - Reddem Link
hrdilshan
Updated:
Thursday at 8:27 PM
Colombo
YEYE 3 in 1 Instant Coffee Mix 50 Sachet
Romeshka
Updated:
Wednesday at 12:16 AM
Colombo
Red Hat Certified System Administrator (RHCSA) - RHEL 10
Sanjeewani95
Updated:
Jul 3, 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
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom