Solved

what is the function of this vbscript

Posted on 2013-11-04
1
274 Views
Last Modified: 2013-11-14
Option explicit
    Dim strHost, strMessage, strTitle, strDefaultShare, strShare, objShell, wshShell, strUNCPath
    ' Set hostname
    strHost = "LOKI.MINKAGROUP.NET"
    ' Set prompt.
    strMessage = "Enter share name"
    ' Set title.
    strTitle = "Explore " & strHost
    ' Set default share name.
    strDefaultShare = "C$"
    ' Display message, title, and default value. If user has clicked Cancel, exit.
    strShare = InputBox(strMessage, strTitle, strDefaultShare)
    If strShare <> "" Then
      set objShell = CreateObject ("Shell.Application")
      set wshShell = CreateObject ("WScript.Shell")
      strUNCPath = "\\" & strHost & "\" & strShare
      objShell.Explore strUNCPath
    End If
0
Comment
Question by:Jason Yu
1 Comment
 
LVL 14

Accepted Solution

by:
ThomasMcA2 earned 500 total points
ID: 39623196
It prompts the user for a share name, then opens Windows Explorer for that share name on LOKI.MINKAGROUP.NET. For example, it opens \\LOKI.MINKAGROUP.NET\my_share$ in Windows Explorer.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
A short article about problems I had with the new location API and permissions in Marshmallow
Learn the basics of lists in Python. Lists, as their name suggests, are a means for ordering and storing values. : Lists are declared using brackets; for example: t = [1, 2, 3]: Lists may contain a mix of data types; for example: t = ['string', 1, T…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now