Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6580569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:02:44+00:00 2026-05-25T16:02:44+00:00

I am trying to get VBSCript to pass configure call gcid splitArray(x) delete for

  • 0

I am trying to get VBSCript to pass “configure call gcid splitArray(x) delete” for each element in the array. Instead im getting “configure call gcid splitArray(x)” until the last element which will comeback as “configure call gcid splitArray(x) delete”.

I am some what new to scripting, thanks in advance.

<head>
<title>Test</title>
<HTA:APPLICATION ID="Test"
 APPLICATIONNAME="Test"
 SCROLL="yes"
 SINGLEINSTANCE="yes"
>
</head>
<script language="vbscript">


Sub ClearCalls
  serv2 = editor.serv1.value
  call2 = editor.call1.value
  splitArray = Split(call2, chr(10), -1, 0)
  set Shell = CreateObject("WScript.Shell")
shell.run "cmd.exe"
  Delay 1
Shell.SendKeys "telnet -f c:\results.txt " & serv2 & ".com"
Shell.SendKeys "{ENTER}"
  Delay 1
Shell.SendKeys "username"
Shell.SendKeys "{ENTER}"
Shell.SendKeys "password"
Shell.SendKeys "{ENTER}"
Shell.SendKeys "admin debugsonus"
Shell.SendKeys "{ENTER}"
For x = 0 To UBound(splitArray)
  splitArray1 = "configure call gcid " & splitArray(x) & " delete"
Shell.SendKeys splitArray1
next
Shell.SendKeys "{ENTER}"
  Delay 1
Shell.SendKeys "exit"
Shell.SendKeys "{ENTER}"
  Delay 2
Shell.SendKeys "{ENTER}"
Shell.SendKeys "exit"
Shell.SendKeys "{ENTER}"
readfile
End Sub

Sub Delay( seconds )
  Dim wshShell
  Set wshShell = CreateObject( "WScript.Shell" )
  wshShell.Run "ping -n " & ( seconds + 1 ) & " 127.0.0.1", 0, True
  Set wshShell = Nothing
End Sub

</script>
<script language="JScript" type="text/jscript">
<!--
function readFile()
 {
   var fso, fileHandle, contents, resultvar;
   fso = new ActiveXObject("Scripting.FileSystemObject");
   fileHandle = fso.OpenTextFile(document.editor.resultvar.value, 1);
   contents = fileHandle.ReadAll();
   if (contents)
     document.all("results").value = contents;
   fileHandle.close();
 }
//-->
</script>
<body>
<form name="editor">
<table>
  <tr>
<td align="right">Server Name:</td>
<td><input type="text"  size="18" id="serv1"></td>
  </tr>
  <tr>
<td align="right" valign="top">Calls:</td>
<td><textarea size="18" id="call1" rows="10"></textarea></td>
  </tr>
<td valign="bottom" align="left" colspan="2">
  <button type="submit" name="run_button"  onClick="ClearCalls">Clear Calls</button>
</td>
  <tr>
<td align="right" valign="top">Results:</td>
<td><textarea cols="80" rows="20" name="results" id="results" rows="10"></textarea></td>
  </tr>
</table>
<td><input type="hidden" name="resultvar" value="c:\results.txt"></td>
</body>

If i use these variables in textarea call1

asd

asd

asd

asd

asd

asd

sad

i will get the following in results textarea

configure call gcid asd

error: Incomplete command. Expected one of: DELETE

deleteconfigure call gcid asd

error: invalid command name “deleteconfigure”

deleteconfigure call gcid asd
error: invalid command name “deleteconfigure”

deleteconfigure call gcid asd

error: invalid command name “deleteconfigure”

deleteconfigure call gcid asd

error: invalid command name “deleteconfigure”

deleteconfigure call gcid asd

error: invalid command name “deleteconfigure”

deleteconfigure call gcid sad delete

error: invalid command name “deleteconfigure”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:02:45+00:00Added an answer on May 25, 2026 at 4:02 pm

    I think your call2 contains vbCrLfs instead of the vbLf you are splitting for. Evidence:

    >> a = Split( Join( Array( "a", "b", "c" ), vbCrLf ), vbLf )
    >> For Each s In a
    >>     WScript.Echo "xxxx" & s & "yyyy"
    >> Next
    >>
    yyyya
    yyyyb
    xxxxcyyyy
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't get the following function in VBScript to work. I am trying to
Bah, vbscript. I'm trying to figure out how to get this statement to work:
When trying get in memcache client, getting the below excepton. Caused by: java.io.IOException: com.fet.myclass.webservice.data.DataList
I'm trying to create a permutation of a multidimensional array in classic asp (vbscript)
I'm trying get values from a GridView using the following code: foreach (GridViewRow row
Trying to get my css / C# functions to look like this: body {
Trying to get an ASP application deployed; it worked for a while but then
Trying to get this example working from http://www.munna.shatkotha.com/blog/post/2008/10/26/Light-box-effect-with-WPF.aspx However, I can't seem to get
Trying to get parameters from a PUT request using HttpServlet#doPut: public void doPut(HttpServletRequest request,
Trying to get comfortable with jQuery and I have encountered some sample code that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.