Error resolution when the hint file is not found in C # when calling Pocess.start () in the XP environment

Source: Internet
Author: User

The error prompts are as follows:

System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified.

In System.Diagnostics.Process.StartWithShellExecuteEx (ProcessStartInfo startinfo)
In System.Diagnostics.Process.Start ()
In SmallScene.Login.Login_Load (Object sender, EventArgs e)

In System.Windows.Forms.Form.OnLoad (EventArgs e)
In System.Windows.Forms.Form.OnCreateControl ()
In System.Windows.Forms.Control.CreateControl (Boolean fignorevisible)
In System.Windows.Forms.Control.CreateControl ()
In System.Windows.Forms.Control.WmShowWindow (message& m)
In System.Windows.Forms.Control.WndProc (message& m)
In System.Windows.Forms.ScrollableControl.WndProc (message& m)
In System.Windows.Forms.ContainerControl.WndProc (message& m)
In System.Windows.Forms.Form.WmShowWindow (message& m)
In System.Windows.Forms.Form.WndProc (message& m)
In System.Windows.Forms.Control.ControlNativeWindow.OnMessage (message& m)
In System.Windows.Forms.Control.ControlNativeWindow.WndProc (message& m)
In System.Windows.Forms.NativeWindow.Callback (IntPtr hWnd, Int32 msg, INTPTR wparam, INTPTR lparam)

Workaround:

1. Double quotation marks on all paths to prevent the appearance of spaces. For example Process.Start ("\" C:\\Program Files\\winrar.exe\ "");

2. All paths with absolute path, resolutely eliminate the occurrence of relative paths. (Error occurs because XP is called)

Error resolution when the hint file is not found in C # when calling Pocess.start () in the XP environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.