472,371 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Console Minimize not happening for MSDE Install

I am attempting to install the MSDE (SQL 2000) as a part of our application.
This requires that you run the MSDE setup.exe program from a Console mode
application, it just hangs forever part way through if executed from a
standard application.

My question is:

How can I make my console mode install application resize it's window or
minimize. The code below is what I'm currently trying which doesn't work...
the Console BOX stays full size.

Process ThisProcess;

ProcessStartInfo SetupProcess = new ProcessStartInfo();
SetupProcess.FileName = "setup.exe";
SetupProcess.Arguments = "INSTANCENAME=\"FBSQL\" /qb";

SetupProcess.WindowStyle = ProcessWindowStyle.Minimized;

ThisProcess = Process.Start(SetupProcess);
ThisProcess.WaitForExit();
Nov 15 '05 #1
3 4181
OK, so I'm a dummy, my code below requests the new process to be minimized,
which isn't what I want. What I need to know is how do I minimize or resize
my currently executing Console mode application.

"Mike Oliszewski" <mi*************@faxback.com> wrote in message
news:uJ**************@TK2MSFTNGP09.phx.gbl...
I am attempting to install the MSDE (SQL 2000) as a part of our application. This requires that you run the MSDE setup.exe program from a Console mode
application, it just hangs forever part way through if executed from a
standard application.

My question is:

How can I make my console mode install application resize it's window or
minimize. The code below is what I'm currently trying which doesn't work... the Console BOX stays full size.

Process ThisProcess;

ProcessStartInfo SetupProcess = new ProcessStartInfo();
SetupProcess.FileName = "setup.exe";
SetupProcess.Arguments = "INSTANCENAME=\"FBSQL\" /qb";

SetupProcess.WindowStyle = ProcessWindowStyle.Minimized;

ThisProcess = Process.Start(SetupProcess);
ThisProcess.WaitForExit();

Nov 15 '05 #2

Hi Mike,

Thanks for posting in this group.
Based on my understanding, your install application is a console
application. In it, you wanted to invoke setup.exe to install MSDE.
And when invoke setup.exe, you want to minimize your install application's
console window.

Actually, you can P/invoke GetConsoleWindow() to get your console window's
handle, then you can use MoveWindow() to change its size and position.
Use ShowWindow() to minize or maximize your console window.

Sample code snippet like this:
[DllImport("user32.dll")]
public static extern bool MoveWindow(IntPtr hwnd,int x,int y,int
nWidth,int nHeight,bool bRepaint);

[DllImport("kernel32.dll")]
public static extern IntPtr GetConsoleWindow();

[DllImport("user32.dll")]
public static extern bool ShowWindow(IntPtr hwnd,int nCmdShow);

private const int SW_MINIMIZE=6;

//in main function
IntPtr hwnd=GetConsoleWindow();
MoveWindow(hwnd,0,0,200,200,true); //Change console window's position and
size

ShowWindow(hwnd,SW_MINIMIZE);//Minimize the console window

These all works well on my machine.
Btw: SW_MINIMIZE const can be got from VB 6.0 API viewer.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #3
Thank You!!

""Jeffrey Tan[MSFT]"" <v-*****@online.microsoft.com> wrote in message
news:ye****************@cpmsftngxa06.phx.gbl...

Hi Mike,

Thanks for posting in this group.
Based on my understanding, your install application is a console
application. In it, you wanted to invoke setup.exe to install MSDE.
And when invoke setup.exe, you want to minimize your install application's
console window.

Actually, you can P/invoke GetConsoleWindow() to get your console window's
handle, then you can use MoveWindow() to change its size and position.
Use ShowWindow() to minize or maximize your console window.

Sample code snippet like this:
[DllImport("user32.dll")]
public static extern bool MoveWindow(IntPtr hwnd,int x,int y,int
nWidth,int nHeight,bool bRepaint);

[DllImport("kernel32.dll")]
public static extern IntPtr GetConsoleWindow();

[DllImport("user32.dll")]
public static extern bool ShowWindow(IntPtr hwnd,int nCmdShow);

private const int SW_MINIMIZE=6;

//in main function
IntPtr hwnd=GetConsoleWindow();
MoveWindow(hwnd,0,0,200,200,true); //Change console window's position and
size

ShowWindow(hwnd,SW_MINIMIZE);//Minimize the console window

These all works well on my machine.
Btw: SW_MINIMIZE const can be got from VB 6.0 API viewer.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 15 '05 #4

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

Similar topics

0
by: rdlebreton | last post by:
Hello, I work in Tech Support at a company that has a new product using the MSDE 1.0 (MSSQL 7) at its database engine. We have a growning number of clients using this product and, of course,...
1
by: Steve Bishop | last post by:
Hope MSDE questions ok here. I would like to distribute a MSDE application on CD ROM. I don't have any of the packaging solutions i.e. Visual Studio, Office Developer or VB Pro. I'm using MS Web...
10
by: noname | last post by:
MSDE 2000 Release A installed under windows 2000 pro will not communicate with SQL Server Manager nor MS Access on peer computer. Can someone help? Have set DISABLENETWORKPROTOCOLS=0 at install...
2
by: Rosy Moss | last post by:
I am in the process of cleaning up a database that our company uses to track jobs, time and expense, and customer information. We are running Windows 2000 Server with approximately 20 terminals...
1
by: Paul Aspinall | last post by:
Hi I have a C# Winform app which runs using SQL Server. I want to package up the app, so that it deploys with MSDE. Can anyone offer any pointers or references to help?? Thanks
3
by: Paul Aspinall | last post by:
Hi I want to package my C# winforms app, to be deployed with MSDE, as easily as possible for the end user. I want to create an MSI or Installshield (prefer MSI), to setup my C# app, together...
0
by: Brian Smither | last post by:
I have SBS2003-SP1 (with MSDE) installed. I have read several "How-To's" on upgrading MSDE to 2K5Express, but none have directly answered the SBS2003/MSDE install scenario: is MSDE a "module" of...
7
by: Abelard | last post by:
How do I programmatically minimize the console window in a VB .NET console application?
5
by: =?Utf-8?B?SmFtZXMgV29uZw==?= | last post by:
Dear all, I'd like to know if there is any method to minimize command mode window when a console program is running. In my case, there are several console programs which run periodically in...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: Johno34 | last post by:
I have this click event on my form. It speaks to a Datasheet Subform Private Sub Command260_Click() Dim r As DAO.Recordset Set r = Form_frmABCD.Form.RecordsetClone r.MoveFirst Do If...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.