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 790705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:43:24+00:00 2026-05-14T21:43:24+00:00

I have a 3G card to provide internet to a remote computer… I have

  • 0

I have a 3G card to provide internet to a remote computer… I have to run a program(provided with the card) to establish the connection… since connections suddenly is lost I wrote a script that Kills the program and reopens it so that the connection is reestablished, there are certain versions of this program that don’t kill the connection when killed/terminated, just when closed properly.

so I am looking for a script or program that “Properly Closes” a window so I can close it and reopen it in case the connection is lost.

this is the code that kills the program

Option Explicit
Dim objWMIService, objProcess, colProcess
Dim strComputer, strProcessKill 
strComputer = "."
strProcessKill = "'Telcel3G.exe'" 

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _ 
& strComputer & "\root\cimv2") 

Set colProcess = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = " & strProcessKill )
For Each objProcess in colProcess
objProcess.Terminate()
Next 
WSCript.Echo "Just killed process " & strProcessKill _
& " on " & strComputer
WScript.Quit 
  • 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-14T21:43:24+00:00Added an answer on May 14, 2026 at 9:43 pm

    If you have to use VBScript, one easy way would be to activate the app and then use SendKeys to restore it if it’s minimized and send it “alt-f4”. It’s hacky, but it may be easier than finding the main window’s handle, and it might work well enough for you.

    Option Explicit
    Dim objWMIService, objProcess, colProcess
    Dim strComputer, strProcessKill 
    strComputer = "."
    strProcessKill = "'Telcel3G.exe'" 
    
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" _ 
    & strComputer & "\root\cimv2") 
    
    dim WshShell
    set WshShell = CreateObject("WScript.Shell")
    
    Set colProcess = objWMIService.ExecQuery _
    ("Select * from Win32_Process Where Name = " & strProcessKill )
    For Each objProcess in colProcess
    WshShell.AppActivate objProcess.ProcessId
    WScript.Sleep 1000 
    WshShell.Sendkeys "% r"
    WScript.Sleep 1000
    WshShell.Sendkeys "%{F4}"
    Next 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a card layout set in my app.js. here's the code; ... launch:
I have a Card class and I want to overload the > operator to
If I have a Visa card number saved in my database, is there a
Even though I have a fermi card(gtx 560) I get this error on VS2010:
I'm writing some attendance software. Each member will have an ID card with a
I have an array of Card objects (NSObjects), each with a field called tags
I have a Vodaphone data card with SIM embedded in that. There is IMEI
i have developed application for read information from card reader. Here i have used
I have a table strcuture (golf score card) as follow: HoleID int CourseID int
I have a view ( Panel ) that is a card layout. I have

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.