Solved

what is the function of this vbscript

Posted on 2013-11-04
1
286 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Six Sigma Control Plans
Progress

688 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