[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

what is the function of this vbscript

Posted on 2013-11-04
1
Medium Priority
?
290 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Make the most of your online learning experience.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
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 …
Starting up a Project
Suggested Courses
Course of the Month19 days, 16 hours left to enroll

872 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