473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

This should be so easy!

Hi all, I am trying to run calc from the command line using a Process.
I am clearly missing something obvious here because the command line
opens but the "Calc" arg never executes...code below...thanks.

Module Module1

Sub Main()
Dim proc As New Process()
Dim info as ProcessStartInfo = new ProcessStartInfo("cmd.exe",
"calc")
proc.StartInfo = info
proc.EnableRaisingEvents = true
proc.Start()
proc.WaitForExit()
End Sub

End Module
Nov 21 '05 #1
4 1497

"calc" is not a valid command line switch for cmd.exe
Try "/C calc" or "/K calc"

--Robby

"Garrett" <ag*******@hotmail.com> wrote in message
news:3a*************************@posting.google.co m...
Hi all, I am trying to run calc from the command line using a Process.
I am clearly missing something obvious here because the command line
opens but the "Calc" arg never executes...code below...thanks.

Module Module1

Sub Main()
Dim proc As New Process()
Dim info as ProcessStartInfo = new ProcessStartInfo("cmd.exe",
"calc")
proc.StartInfo = info
proc.EnableRaisingEvents = true
proc.Start()
proc.WaitForExit()
End Sub

End Module

Nov 21 '05 #2

"Garrett" <ag*******@hotmail.com> wrote in message
news:3a*************************@posting.google.co m...
Hi all, I am trying to run calc from the command line using a Process.
I am clearly missing something obvious here because the command line
opens but the "Calc" arg never executes...code below...thanks.

Module Module1

Sub Main()
Dim proc As New Process()
Dim info as ProcessStartInfo = new ProcessStartInfo("cmd.exe",
"calc")
proc.StartInfo = info
proc.EnableRaisingEvents = true
proc.Start()
proc.WaitForExit()
End Sub

End Module
Try Dim info as ProcessStartInfo = new ProcessStartInfo("calc")



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.799 / Virus Database: 543 - Release Date: 11/19/2004
Nov 21 '05 #3
Try
Dim info as ProcessStartInfo = new ProcessStartInfo("calc.exe")
instead of "cmd.exe", "calc" and it will work just fine.

"Garrett" <ag*******@hotmail.com> wrote in message
news:3a*************************@posting.google.co m...
Hi all, I am trying to run calc from the command line using a Process.
I am clearly missing something obvious here because the command line
opens but the "Calc" arg never executes...code below...thanks.

Module Module1

Sub Main()
Dim proc As New Process()
Dim info as ProcessStartInfo = new ProcessStartInfo("cmd.exe",
"calc")
proc.StartInfo = info
proc.EnableRaisingEvents = true
proc.Start()
proc.WaitForExit()
End Sub

End Module

Nov 21 '05 #4
System.Diagnostics.Process.Start("calc.exe")
--
Scott Swigart
http://blog.swigartconsulting.com

"Garrett" <ag*******@hotmail.com> wrote in message
news:3a*************************@posting.google.co m...
Hi all, I am trying to run calc from the command line using a Process.
I am clearly missing something obvious here because the command line
opens but the "Calc" arg never executes...code below...thanks.

Module Module1

Sub Main()
Dim proc As New Process()
Dim info as ProcessStartInfo = new ProcessStartInfo("cmd.exe",
"calc")
proc.StartInfo = info
proc.EnableRaisingEvents = true
proc.Start()
proc.WaitForExit()
End Sub

End Module

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Canon EOS | last post by:
Hi, I am really new in .net and pocket PC development. My background are purely C/C++/VC++. Have developed on Mobile Java for a year and felt completely insecure with it because all codes can...
2
by: Hal Vaughan | last post by:
I'm self taught and most of what I've been working on for the past several years has been entirely in Perl and Java. I've noticed that I can code about 5 times faster in Perl than Java, in part...
13
by: Ghislain Tanguay | last post by:
I have a compiled vb.net app and I want to give the user a choice to launch it from the start line command and pass it a parameter or not. How can I do that in my code? Is it possible? Ex. :...
6
by: Martin Bootsma | last post by:
I have a C question, which looks very easy, but no one here seems to know an easy answer. I have a function "powell" (from Numerical Recipes) which takes an argument of the type "double...
1
by: NevilleDNZ | last post by:
Hi, Apologies first as I am not a unicode expert.... indeed I the details probably totally elude me. Not withstanding: how can I convert a binary string containing UTF-8 binary into a python...
6
cjbrx3115
by: cjbrx3115 | last post by:
Hey everyone, I just bought a new Windows Vista (Home Premium) computer. My old computer, a Windows XP Professional, had all of my old documents, spreadsheets, etc. I was planing on using the Easy...
2
by: Ben | last post by:
I'm looking for a web application framework with a good interface to PostgreSQL. The app I'm developing is relatively simple, but I'm new to coding, so it needs to be easy. What I'm making is...
59
by: Kevin Walzer | last post by:
From the introduction to PyObjC, the Python-Objective-C bridge on Mac OS X: "As described in Objective-C for PyObjC users the creation of Objective-C objects is a two-stage process. To initialize...
2
by: Dr. Colombes | last post by:
Is there an easy scientific graphics (plotting) package for Python 2.5.1 running on Ubuntu Linux 7.1 ("Gutsy Gibbon")? A few years ago I used PyLab (a MatLab-like plotting module for Python) on...
14
by: Grant | last post by:
I've seen a couple of articles on the internet that VB.NET applications can be decompiled very easy. For those who have had experience with this, is it true? What steps can be taken to avoid...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
jinu1996
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...
0
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...
0
tracyyun
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.