Click here to Skip to main content
15,887,812 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hey,

wenn running this command from cmd:

c:\windows\explorer.exe "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D}"


printers and faxes open, in an own process (2. explorer.exe) with only this window.
When i create a shortcut of explorer.exe with these parameters, same.

BUT!
If i use

C#
Process.Start(@"c:\windows\explorer.exe", @"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\::{21EC2020-3AEA-1069-A2DD-08002B30309D}\::{2227A280-3AEA-1069-A2DE-08002B30309D}");


in c# the printers and faxes windows open too, but in same explorer process as already running (with taskbar etc.)

I also tried to set the workingdirectory to "c:\windows", but it doesnt work too.

Any Idea, how to open it in an new Process?

hope for help.

cheers
aspire1337
Posted

1 solution

Hi,
Use ProcessStartInfo and set CreateNoWindow and UseShellExecute to desired values depending what you want to achieve.

Explore this links:
1. CreateNoWindow in combination with UseShellExecute[^]
2. ProcessStartInfo Class[^]
 
Share this answer
 
Comments
aspire1337 15-Feb-12 10:02am    
Hi,
thanks for answering.

I set UseShellExecute to false and CreateNoWindow to true (like in the blog), i got an window when starting my application but still in the same process as the explorer.exe with taskbar etc.
Any Idea?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900