By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,950 Members | 1,019 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,950 IT Pros & Developers. It's quick & easy.

How to create an exe of a vb.net windows application

Malathi
P: 31
Hi all,

I want to create an exe of a vb.net windows application and this application has 2 input paramaters.(This exe will called by a stored procedure). Whats the good way to create an exe? Should I go ahead with console application for passing parameters? Or by simply creating an exe is enough to pass the parameters?

Thanks,
Malathi
Apr 18 '12 #1

✓ answered by zacksoniar

See if it helps... U will have to search more about Process Class

Expand|Select|Wrap|Line Numbers
  1. Process a = new Process();
  2. ProcessStartInfo sInfo = new ProcessStartInfo();
  3. sInfo.Arguments = "SwitchUser";
  4. a.StartInfo = sInfo;
  5. try
  6. {
  7.   a.Start();
  8. }
  9.  

Share this Question
Share on Google+
4 Replies


P: 45
In Project Properties - > Debug -> Start options -> command line arguments... u can specify ur input parameters. Set Configuration as Release.
Apr 21 '12 #2

Malathi
P: 31
Thanks for your reply Zacksoniar! I tried this also.. But I need a solid solution.After creating an exe,I want to call this exe in another windows application.
Apr 23 '12 #3

P: 45
See if it helps... U will have to search more about Process Class

Expand|Select|Wrap|Line Numbers
  1. Process a = new Process();
  2. ProcessStartInfo sInfo = new ProcessStartInfo();
  3. sInfo.Arguments = "SwitchUser";
  4. a.StartInfo = sInfo;
  5. try
  6. {
  7.   a.Start();
  8. }
  9.  
Apr 23 '12 #4

Malathi
P: 31
Atlast I found the key! To create an exe - better you create a console application and do your stuff.. Call this exe in another windows or web app by using the above code of zacksoniar..
Apr 26 '12 #5

Post your reply

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