Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

User Input from Text File

$
0
0

Hello

I would like to incorporate code into this to allow the script I found on the internet to pull input from a txt file and then wait for the script to end before using the next entry in the text file and run until all entries in the text file have been used.

Any help would be great thx.

Jason


' Get Options from user
GetOptions



If (bInvalidArgument) Then
    WScript.Echo"Invalid Arguments" & VbCrLf
    bDisplayHelp = True
EndIf

If (bDisplayHelp) Then
    DisplayHelp
Else
    If (bCheckVersion) Then
        CheckVersion
    EndIf
    If (strComputer = "") Then
        strComputer = InputBox("What Computer do you want to document (default=localhost)","Select Target",".")
    EndIf
    If (strComputer <> "") Then
        ' Run the GatherWMIInformation() function and return the status
        ' to errGatherInformation, if the function fails then the
        ' rest is skipped. The same applies to GatherRegInformation
        ' if it is successful we place the information in a
        ' new word document
        errGatherWMIInformation = GatherWMIInformation()
        If (errGatherWMIInformation) Then
            If (bDoRegistryCheck) Then
                errGatherRegInformation = GatherRegInformation
            EndIf
            GetWMIProviderList
        Else
            WScript.Quit(999)
        EndIf

        If (bHasMicrosoftIISv2) Then' Does the system have the WMI IIS Provider
            GatherIISInformation
        EndIf

        SystemRolesSet
        
        If (errGatherWMIInformation) Then
            SelectCase strExportFormat
                Case"word"
                    PopulateWordfile
                Case"xml"
                    PopulateXMLFile
            EndSelect
        EndIf
    EndIf
EndIf


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>