PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
unable to run msconfig.exe-VBForums
Results 1 to 22 of 22

Thread: unable to run msconfig.exe

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2018
    Posts
    8

    unable to run msconfig.exe

    Hello,

    I use Windows 10 64 Bits with Visual Studio Community 2017, i wish to create a button to run msconfig.
    I tried with Process.Start() shell() ; nothing works i have the following error message :
    System.IO.FileNotFoundException*: 'File not found.'

    The app use and admin account and i checked the file msconfig.exe exists.

    Any idea ?

    Thank you so much for your help!

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    100,383

    Re: unable to run msconfig.exe

    If it didn't work then you did it wrong. If you don't show us what you did then we can't tell you what's wrong with it. Don't provide vague descriptions of what you did. Show us the actual code.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    100,383

    Re: unable to run msconfig.exe

    Hmmm... just tested this:
    vb.net Code:
    1. Process.Start("C:\Windows\System32\msconfig.exe")
    so with fully-qualified path, and also running the project EXE as an administrator and I still got the same error message. I suspect that it's got to do with virtualisation, where apps are given their own virtual version of various system locations in the file system and Registry in order to protect the system from rogue and malicious users or apps. I'm not sure of all the details so I don't know whether there's even a way around it but that might provide an avenue for investigation.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    New Member
    Join Date
    Nov 2018
    Posts
    8

    Re: unable to run msconfig.exe

    i think it is related to WIN32 application not ?
    So no way to run msconfig in VB.Net ?

  5. #5
    Frenzied Member ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    1,368

    Re: unable to run msconfig.exe

    Quote Originally Posted by jmcilhinney View Post
    Hmmm... just tested this:
    vb.net Code:
    1. Process.Start("C:\Windows\System32\msconfig.exe")
    so with fully-qualified path, and also running the project EXE as an administrator and I still got the same error message. I suspect that it's got to do with virtualisation, where apps are given their own virtual version of various system locations in the file system and Registry in order to protect the system from rogue and malicious users or apps. I'm not sure of all the details so I don't know whether there's even a way around it but that might provide an avenue for investigation.
    I just tried the above on WIN7 64 bit (not as Admin), and it worked with no problem, seems to be Win 10 related
    to hunt a species to extinction is not logical !
    since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.

  6. #6

    Thread Starter
    New Member
    Join Date
    Nov 2018
    Posts
    8

    Re: unable to run msconfig.exe

    Thank's for the trie.
    Any idea to make that compatible with Win7 to 10 ?

  7. #7

    Thread Starter
    New Member
    Join Date
    Nov 2018
    Posts
    8

    Re: unable to run msconfig.exe

    Thank's for the attempt.
    Any idea to make that compatible with Win7 to 10 ?

  8. #8
    Addicted Member
    Join Date
    May 2017
    Location
    Italy
    Posts
    137

    Re: unable to run msconfig.exe

    I just tried manually on WIN10 64 bit without success

  9. #9
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    40,280

    Re: unable to run msconfig.exe

    Try making use of the SysNative alias of System32, eg:
    Code:
    Dim msConfig as String = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Windows), "sysnative", "msconfig.exe")
        Process.Start(msConfig)

  10. #10
    Frenzied Member ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    1,368

    Re: unable to run msconfig.exe

    Hi,

    see if this works..
    Code:
     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            'Process.Start("C:\Windows\System32\msconfig.exe")
            Dim startInfo As ProcessStartInfo = New ProcessStartInfo("C:\Windows\System32\msconfig.exe")
            startInfo.WindowStyle = ProcessWindowStyle.Normal
            Process.Start(startInfo)
    
        End Sub
    to hunt a species to extinction is not logical !
    since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.

  11. #11

    Thread Starter
    New Member
    Join Date
    Nov 2018
    Posts
    8

    Re: unable to run msconfig.exe

    same issue

  12. #12
    Fanatic Member
    Join Date
    Aug 2004
    Location
    Essex, UK
    Posts
    555

    Re: unable to run msconfig.exe

    Running the project exe (in the bin > debug folder) as administrator worked for me on Windows 10:

    Code:
    Process.Start("C:\Windows\Sysnative\msconfig.exe")

  13. #13

    Thread Starter
    New Member
    Join Date
    Nov 2018
    Posts
    8

    Re: unable to run msconfig.exe

    Thank you so much @Paul4ije; it works!

  14. #14
    Frenzied Member ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    1,368

    Re: unable to run msconfig.exe

    that is strange, Si's code in Post#9 didn't work

    Win10 is one strange OS
    to hunt a species to extinction is not logical !
    since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.

  15. #15

    Thread Starter
    New Member
    Join Date
    Nov 2018
    Posts
    8

    Re: unable to run msconfig.exe

    Thank's everyone!

  16. #16
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    40,280

    Re: unable to run msconfig.exe

    Quote Originally Posted by ChrisE View Post
    that is strange, Si's code in Post#9 didn't work

    Win10 is one strange OS
    paulg4ije made a small but very important change to it, which was to run it as Admin... given that msconfig is an admin program, it isn't particularly surprising that it requires admin rights.

    Note however that detecting the path of Windows as I did is a wise move, as it isn't guaranteed to always be C:\Windows

  17. #17
    Frenzied Member ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    1,368

    Re: unable to run msconfig.exe

    Quote Originally Posted by si_the_geek View Post
    paulg4ije made a small but very important change to it, which was to run it as Admin... given that msconfig is an admin program, it isn't particularly surprising that it requires admin rights.

    Note however that detecting the path of Windows as I did is a wise move, as it isn't guaranteed to always be C:\Windows
    I see, thanks for the detail Information
    to hunt a species to extinction is not logical !
    since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.

  18. #18

    Thread Starter
    New Member
    Join Date
    Nov 2018
    Posts
    8

    Re: unable to run msconfig.exe

    So nice people!

  19. #19
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    100,383

    Re: unable to run msconfig.exe

    It's interesting that that worked for you guys. I suspected that it would and I tested it myself but it still didn't work for me. Not sure why.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  20. #20
    Addicted Member
    Join Date
    May 2017
    Location
    Italy
    Posts
    137

    Re: unable to run msconfig.exe

    it still didn't work for me too

  21. #21
    Lively Member
    Join Date
    Jan 2013
    Posts
    100

    Re: unable to run msconfig.exe

    Hi keanny479,

    You're suffering from the "File System Redirector", which is explained here.

    Just change your build configuration target from x86 to Any CPU and you're good to go.

    Hope that helps.

  22. #22
    Frenzied Member ChrisE's Avatar
    Join Date
    Jun 2017
    Location
    Frankfurt
    Posts
    1,368

    Re: unable to run msconfig.exe

    Quote Originally Posted by cPubis View Post
    Hi keanny479,

    You're suffering from the "File System Redirector", which is explained here.

    Just change your build configuration target from x86 to Any CPU and you're good to go.

    Hope that helps.
    hope someone will try this with Win10 and report back
    to hunt a species to extinction is not logical !
    since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width