Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

what is the function of this vbscript

Posted on 2013-11-04
1
Medium Priority
?
288 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
ThomasMcA2 earned 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Six Sigma Control Plans
Suggested Courses

609 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