473,387 Members | 1,485 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,387 software developers and data experts.

how to start process with different extension

joedeene
583 512MB
hi all,

i want to start a process for an executable but with a different extension. like i want Process,start("C:\myprocess.anyextension") to start as an executable but i dont know how to do it, the original extension is an executable but i want to change the extension and start is as an executable file, any help ? =)
Aug 5 '08 #1
4 915
Plater
7,872 Expert 4TB
I think you just *can*. At least when in cmd.exe you can
I just copied an exe over to "wmi.fred" and typed it in and it ran fine?
So "cmd /C wmi.fred"
Aug 5 '08 #2
joedeene
583 512MB
no, not in visual basic 2008, you cant just say

process.start(filename.myownfileextension)

i read something about in the processstartinfo, like the option 'useshellexecute'.

but it said it is true by default where i read it, but i dont remember, uhm, but idk i know its possible...
Aug 5 '08 #3
Plater
7,872 Expert 4TB
You can certainly do it using the process class.
Expand|Select|Wrap|Line Numbers
  1. Process p = new Process();
  2. ProcessStartInfo psi = new ProcessStartInfo(@"C:\wmi.fred", "");
  3. psi.UseShellExecute = false;
  4. p.StartInfo = psi;
  5. p.Start();
  6.  
Aug 5 '08 #4
joedeene
583 512MB
hey, plater, thanks a bunch, i knew it was something simple kinda, but im a little tired, haha. but ya it works for now, but im gonna put it to the test for something i want it to do, basically the same thing, but for a different purpose but thanks for all of your help, =)
Aug 5 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dean Slindee | last post by:
The code below is being used to launch WinWord.exe from a VB.NET program. Word launches, but displays this error message: "Word has experienced an error trying to open the file. Try these...
22
by: nd02tsk | last post by:
Hello! I have a couple of final ( I hope, for your sake ) questions regarding PostgreSQL. I understand PostgreSQL uses processes rather than threads. I found this statement in the archives: ...
0
by: Kirk | last post by:
The following C# web service works fine until you uncomment the lines setting UserName and Password. Then, Process.Start throws an Access is Denied Exception. This is with .NET 2.0, of course...
2
by: Daniel | last post by:
System.Diagnostics.Process.Start fails on windows server 2003 the process returns process.ExitCode == 0 but executing any process with System.Diagnostics.Process.Start on windows xp works fine....
4
by: Dirk Behnke | last post by:
How can I start a new process with a different CultureInfo? I have tried already to set the CultureInfo of the thread starting the new process before creating the Process object, but it doesn't...
2
by: Miro | last post by:
In VB-2003, I was wondering if someone can point me in the right direction: Lets say the user has a shortcut on his desktop to your app. 1. Is there any way to capture what the "Start In"...
5
by: Reddy | last post by:
I am running process.sart to run gpg.exe to encrypt files. It's working fine with console application. When i use same code in windows service. It's not working. It's not even throwing...
3
by: Marcin Kalicinski | last post by:
How do I use multiple Python interpreters within the same process? I know there's a function Py_NewInterpreter. However, how do I use functions like Py_RunString etc. with it? They don't take any...
7
by: sara | last post by:
I have a friend doing some pro-bono work for a non-profit that does job training for distressed kids under DCSS care. He asked me for code to do the following (he's using A2003). I can't find...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.