I recently resolved an issue I had with passing a variable to a call
shell command, but now I need it to pause or leave the window open so I
can manually close it. Below is my code, and I am not sure where to
begin to keep the DOS window from closing.
Dim stAppName As String
Dim stIPAddress As String
stAppName = "C:\WINDOWS\sys tem32\ping.exe "
stIPAddress = [IPAddress]
Call Shell(stAppName & stIPAddress, 1)
So what happens is a DOS window opens up and pings the ip address that
is listed in the form field, and once the command finishes the DOS
window closes. I would like for the DOS window to stay open.
Thanks,
Tripwire 2 21823 tr*****@gmail.c om wrote: I recently resolved an issue I had with passing a variable to a call shell command, but now I need it to pause or leave the window open so I can manually close it. Below is my code, and I am not sure where to begin to keep the DOS window from closing.
Dim stAppName As String Dim stIPAddress As String
stAppName = "C:\WINDOWS\sys tem32\ping.exe " stIPAddress = [IPAddress] Call Shell(stAppName & stIPAddress, 1)
So what happens is a DOS window opens up and pings the ip address that is listed in the form field, and once the command finishes the DOS window closes. I would like for the DOS window to stay open.
Thanks,
Tripwire
Shell Environ$("COMSP EC") & " /k " & strAppNAme & strIPAddress,1
will keep the dos box open at the command prompt, you can carry on and
type other commands into that box until you type "exit".
Or you can
stAppName = "C:\WINDOWS\sys tem32\ping.exe -t "
Then it will ping until you press Ctrl+C
--
[Oo=w=oO]
Used the Shell Environ$("COMSP EC") & " /k ping """ & stIPAddress, 1
and this worked great! Thanks for the help. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: jrf[no] |
last post by:
Hi all,
I was getting a 500 error and someone adviced me to run the php file
from the command line to check what errors that would come up with.
Great idea which I'd like to use, but when I use the Windows "run" box
to do this, I see a window open and close so quickly that there's no way
for me to read what's come up.
How can I force the window to stay open after the program has finished ?
|
by: BlackHawke |
last post by:
Our program, game program Andromeda Online (www.andromedaonline.net) uses
two programs- one to play the game, another to patch the game as updates
come out. Players actually launch the updater which checks for fresh
updates, then installs them, then launches the game client.
We have begun our beta test, and would like to have the client open with a
console window so that players can see exceptions that are thrown. How to do
this seems to...
|
by: Peter Gordon |
last post by:
When I try to execute another program, the dos command shell window
pops up with the application. For example:
os.system("notepad") brings up the notepad but I also get the command
shell window. How do I prevent command shell window to open?
|
by: KathyB |
last post by:
Hi,
I have an asp.net app running on an Intranet. From one of my aspx
pages I would like to run a javascript that will run the following
command OUTSIDE of the IIS/asp.net environment on the CLIENT machine
(remember, a controlled Intranet!). Is this possible? This windows
program needs to be opened and data entered periodically while using
the asp.net app as well.
The exe runs in a dos command window, tied to a Citrix ica file.
|
by: Tom Dacon |
last post by:
"Open .Net Command Window Here" context menu for Windows Explorer:
The reg file described below adds a new menu item to Windows Explorer's
context menu when you right-click over a folder (or the drive root). The
menu item text is "Open .Net Command Window Here". When you click it, it
opens a command window positioned at that directory and runs the
vsvars32.bat file to set the .Net Framework environment variable settings.
This makes it...
| |
by: Rob |
last post by:
I'm running a batch file using the Shell function.
When I manually launch the batch file, the window remains open, since
I use the 'pause' statement. But when I launch the batch file within
Access, the Shell window becomes a blip on the screen and then is
gone. Why does the Shell window not stay open on the screen? I want
to visually verify that the batch file is functioning properly and
then close the window myself. Am I missing a...
|
by: Bill |
last post by:
I need help closing a CMD window when it is executed from Access.
1) The batch file is called from Access.
2) Access closes,
3) the batch runs a copy of the access database (creating a backup)
4) Once the copy is complete, the batch file opens the Access database
again
5) EXIT should close out the cmd window but it does not execute that
line
|
by: Stefano Tonello |
last post by:
Hi all,
I need to call windows' "open with" dialog from my C# windows form
application. After the user selects application, control must return to
me (I have to launch directly the process).
I found this solution:
http://www.codeproject.com/KB/shell/openwith.aspx
but it's not good for me since it will execute the process directly.
|
by: SilverGS |
last post by:
I want to automatically open a Command Window from the Startup folder in Windows XP.
right now after XP starts, I click on Start run, cmd and then when the command window is open I type in a bunch of commands to start a program and I leave the command window open as the program I am running runs in the command window.
How can I invoke the command window via a .bat file, and then run my commands automatically?
I have the second part...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |