| |

VerySource

 Forgot password?
 Register
Search
View: 1040|Reply: 8

Question about windows service calling external exe program without form? ? ? ? ?

[Copy link]

1

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-28 22:20:01
| Show all posts |Read mode
I call an external exe file in the service. But only in the process, but does not display the interface window. Why is that? Process.start () and My Computer-> Administration-> Services-> Your corresponding service name-> Properties-> Login-> Selected "Allow service to interact with desktop" I have used but still no form? why? Can that expert tell me? Thank you
Reply

Use magic Report

0

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 United States

Post time: 2020-3-2 00:30:01
| Show all posts
It seems that there is a property that can be set, you look for it.
Reply

Use magic Report

1

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-3-3 13:15:01
| Show all posts
upstairs. That attribute? Have I searched? Didn't find the right one?
Reply

Use magic Report

0

Threads

31

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-3-6 13:00:01
| Show all posts
See if there are any overloaded parameters that can be set when calling
Reply

Use magic Report

1

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-3-13 22:15:01
| Show all posts
not found. Tell me who did it?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-30 16:45:01
| Show all posts
p.StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-30 17:00:01
| Show all posts
What permissions does your service run with? This should be a problem of permissions. When you start the process, the permissions are inherited from your current service. So if the service is logged in by another user, the newly opened window will only be displayed on the desktop of the other user.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-1 19:15:01
| Show all posts
I also encountered this problem, but it was solved after checking "Allow service to interact with desktop".
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-6 18:00:01
| Show all posts
Process proc = new Process();
                    //proc.StartInfo.WorkingDirectory = ConfigurationManager.AppSettings["path"].ToString();
                    proc.StartInfo.UseShellExecute = true;
                    //proc.StartInfo.Verb = "Open";
                    proc.StartInfo.CreateNoWindow = true;
                    proc.StartInfo.FileName = ConfigurationManager.AppSettings["path"].ToString() + ConfigurationManager.AppSettings["file"].ToString();
                    proc.Start();

In addition, you can solve the problem after checking "Allow service to interact with desktop". The code that passed the test
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list