Results 1 to 34 of 34

Thread: Opening MSCONFIG

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Opening MSCONFIG

    Can anyone help me with this Its a hard one lol setting here for 2 hours trying to figure this out. All I want the button to do is open MSCONFIG

    I created a batch file called config.bat and inside it I put msconfig

    The problem is when I click the button it just flashes CMD and what I can barley read before it closes is msconfig is not an internal command.

    I use the same code to open all other files and everything works fine

    could someone post a working code to open msconfig so i can examine it

    Thank you

  2. #2
    Frenzied Member
    Join Date
    Mar 2005
    Location
    Sector 001
    Posts
    1,577

    Re: Opening MSCONFIG

    Process.Start("MSConfig.exe")
    VB 2005, Win Xp Pro sp2

  3. #3
    Frenzied Member Pc_Not_Mac's Avatar
    Join Date
    Oct 2009
    Location
    localhost
    Posts
    1,206

    Re: Opening MSCONFIG

    You don't need a Batch file to open a file.

    If you want to open a application use.
    Vb.net Code:
    1. Process.Start("path of file")

    If you want to open the Msconfig use
    Vb.net Code:
    1. Process.Start("C:\Windows\System32\msconfig.exe")
    My Codebank:
    Windows Vista & 7 Glass Effect & Limit the amount of times your application could be opened.
    Pause Your Code & Check the OS name

    The question of whether computers can think is like the question of whether submarines can swim.

    Currently learning: Java

    Coding can be a learning experience or

  4. #4

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    I wish it was that easy that did not work i got the following error

    A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.dll

    thanks for the reply

  5. #5

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    Pc not Mac same thing same error

  6. #6
    Frenzied Member Pc_Not_Mac's Avatar
    Join Date
    Oct 2009
    Location
    localhost
    Posts
    1,206

    Re: Opening MSCONFIG

    Make a little batch file:
    Batch Code:
    1. call "C:\Windows\System32\msconfig.exe"
    Does the Msconfig show?
    Also make sure you are running it as Admin.
    My Codebank:
    Windows Vista & 7 Glass Effect & Limit the amount of times your application could be opened.
    Pause Your Code & Check the OS name

    The question of whether computers can think is like the question of whether submarines can swim.

    Currently learning: Java

    Coding can be a learning experience or

  7. #7

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    If I double click it on the computer it just flashes real fast, same is if I run it from vb.

    even if i right click and run as administrator it does the same thing CMD just flashes real fast doesnt load anything. I am pretty sure its saying something about an internal command from what I can see when it flashses lol

  8. #8
    Frenzied Member Pc_Not_Mac's Avatar
    Join Date
    Oct 2009
    Location
    localhost
    Posts
    1,206

    Re: Opening MSCONFIG

    Open the Windows32 folder and locate the Msconfig.exe file and open it.
    Does it open?
    My Codebank:
    Windows Vista & 7 Glass Effect & Limit the amount of times your application could be opened.
    Pause Your Code & Check the OS name

    The question of whether computers can think is like the question of whether submarines can swim.

    Currently learning: Java

    Coding can be a learning experience or

  9. #9

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    It sure does but when I call it from vb it says file not found which might be because of the administration thing which is why I tried to do it as a batch file. Any way around the running as administrator through vb? maybe that would work

  10. #10
    Frenzied Member Pc_Not_Mac's Avatar
    Join Date
    Oct 2009
    Location
    localhost
    Posts
    1,206

    Re: Opening MSCONFIG

    [QUOTE=Servtex]Any way around the running as administrator through vb?[/QUOTE
    No, not in visual basic.

    file not found
    Has nothing do with the app running as admin.
    My Codebank:
    Windows Vista & 7 Glass Effect & Limit the amount of times your application could be opened.
    Pause Your Code & Check the OS name

    The question of whether computers can think is like the question of whether submarines can swim.

    Currently learning: Java

    Coding can be a learning experience or

  11. #11

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    let me paste what I have tried

    If i try this

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

    I get this error

    Win32Exception Was Unhandled


    If i try to use the same code I use to start all my other external applications which is

    Dim p As Process

    Try

    'instance a new process
    p = New Process

    'set the filename to open
    p.StartInfo.FileName = (C:\WIndows\System32\msconfig.exe")

    'open the process in the normal window style
    p.StartInfo.WindowStyle = ProcessWindowStyle.Normal

    'use the OS shell to open the file
    p.StartInfo.UseShellExecute = True

    p.StartInfo.CreateNoWindow = False

    'start the process
    p.Start()


    Catch exc As Exception

    MessageBox.Show(exc.Message, " Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

    End Try


    I get this error

    The system cannot find the file specified

  12. #12
    Frenzied Member Pc_Not_Mac's Avatar
    Join Date
    Oct 2009
    Location
    localhost
    Posts
    1,206

    Re: Opening MSCONFIG

    The system cannot find the file specified
    Why does it look to me that your system does not have Msconfig.

    When you go Start>Run "Msconfig.exe" does show right?
    My Codebank:
    Windows Vista & 7 Glass Effect & Limit the amount of times your application could be opened.
    Pause Your Code & Check the OS name

    The question of whether computers can think is like the question of whether submarines can swim.

    Currently learning: Java

    Coding can be a learning experience or

  13. #13
    Frenzied Member
    Join Date
    Mar 2005
    Location
    Sector 001
    Posts
    1,577

    Re: Opening MSCONFIG

    What is your OS?
    VB 2005, Win Xp Pro sp2

  14. #14

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    yes msconfig comes up on command line, start search, from the system32 folder everywhere but from a batch file or visual basic i dont get it.

    The operating system is windows 7

  15. #15
    Frenzied Member
    Join Date
    Mar 2005
    Location
    Sector 001
    Posts
    1,577

    Re: Opening MSCONFIG

    That is the one OS I don't have on a virtul machine
    Probably has to do with some security restrictions.
    VB 2005, Win Xp Pro sp2

  16. #16

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    Thanks for replying maybe someday we will figure this out lol I am not an advanced programmer but learning and this has been messin with me for days upon days hah

  17. #17
    Wait... what? weirddemon's Avatar
    Join Date
    Jan 2009
    Location
    USA
    Posts
    3,826

    Re: Opening MSCONFIG

    Quote Originally Posted by Servtex View Post
    Thanks for replying maybe someday we will figure this out lol I am not an advanced programmer but learning and this has been messin with me for days upon days hah
    What version of VS are you using?

    And what is your Target CPU?

    You can find which CPU you're targeting by selecting your program's properties from under Project on the menu strip. Select the Compile tab and then select, Advanced Compile Options, which should be located in the bottom left corner of this window.

    I tried replicating your issue on my Windows 7 machine and found when the Target CPU was for x86, it produced the same results. But when I changed it to AnyCPU or x64, it worked just fine, because I'm using a 64 bit OS.
    CodeBank contributions: Process Manager, Temp File Cleaner

    Quote Originally Posted by SJWhiteley
    "game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....

  18. #18

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    oh man that worked but created an issue Now when i use the built in browser to navigate to adobe flash player it says adobe is not available for 64 bit operating system. Is there a way to make the webbrowser 32 bit.

    When compile settings are set to x86 the browser works 32 bit which is what i need but then msconfig wont open

    When compile settings are set to any cpu msconfig opens, then the browser runs 64 bit hah

    any ideas and thanks a lot for the help

  19. #19
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Opening MSCONFIG

    The location you should be looking for is "C:\WINDOWS\PCHEALTH\HELPCTR\BINARIES"

    Also go to the registry on
    "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
    Windows\CurrentVersion\App Paths\MSCONFIG.exe"
    and check the default to read "C:\WINDOWS\PCHealth\HelpCtr\Binaries\
    MSConfig.exe"

    C:\ of course is the winpath so if you have your windows in another drive, apply the appropriate path.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  20. #20
    Frenzied Member
    Join Date
    Mar 2005
    Location
    Sector 001
    Posts
    1,577

    Re: Opening MSCONFIG

    Changing the registry should not be a first choice.

    The usual way to know when a visitor is using a 64 bit version of a browser is to check the user agent of their browser. You can see yours here:
    http://whatsmyuseragent.com/

    Now the user agent of a 64 bit system can be something like this:
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Win64; x64; Trident/4.0)

    So change it to something else less revealing. Try connecting like this:
    Code:
    WebBrowser1.Navigate("http://something.com", "_self", Nothing, "User-Agent: HI")
    VB 2005, Win Xp Pro sp2

  21. #21
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Opening MSCONFIG

    In this case changing the registry(if needed) is the correct choice because what i have written is the default-correct settings for windows 7.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  22. #22
    Lively Member
    Join Date
    May 2006
    Posts
    70

    Re: Opening MSCONFIG

    Quote Originally Posted by sapator View Post
    In this case changing the registry(if needed) is the correct choice because what i have written is the default-correct settings for windows 7.
    I do not have "C:\WINDOWS\PCHEALTH\HELPCTR\BINARIES" on my Windows 64bit and on my Vista 32bit. I do have it on my XP 32bit pc though.

  23. #23
    Frenzied Member
    Join Date
    Mar 2005
    Location
    Sector 001
    Posts
    1,577

    Re: Opening MSCONFIG

    Mhhh this is a hairy issue.
    The user agent change is just a hack, I would try something else first but can't test it (no 64 bit OS).

    The \Windows\SysWOW64 directory is where 32-bit system files are installed. 64-bit system files are in the \Windows\system32 directory for compatibility reasons.

    So see if there is a msconfig file in the SysWOW64 folder and try running that through process.start of your 32 bit app.
    VB 2005, Win Xp Pro sp2

  24. #24
    Lively Member
    Join Date
    May 2006
    Posts
    70

    Re: Opening MSCONFIG

    Quote Originally Posted by Half View Post
    Mhhh this is a hairy issue.
    The user agent change is just a hack, I would try something else first but can't test it (no 64 bit OS).

    The \Windows\SysWOW64 directory is where 32-bit system files are installed. 64-bit system files are in the \Windows\system32 directory for compatibility reasons.

    So see if there is a msconfig file in the SysWOW64 folder and try running that through process.start of your 32 bit app.
    It is not in SysWOW64 folder on Win7 64bit.

    User-Agent hack won't do anything anyways. Flash plug-in does not work in 64bit IE.
    There is a very early beta version of Flash for 64bit browser.
    http://labs.adobe.com/downloads/flashplayer10.html

  25. #25
    Lively Member
    Join Date
    May 2006
    Posts
    70

    Re: Opening MSCONFIG

    Found the solution, you have to run it as

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

  26. #26

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    Thanks everyone for the help I will be testing a few of your methods tonight

  27. #27

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    Quote Originally Posted by SickFinga View Post
    Found the solution, you have to run it as

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


    PERFECT so far everything is working out as planned. I can't say it enough THANK YOU

  28. #28

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    Wow this is the devil though everything was good until I went to run my app on another computer and Process.Start("C:\Windows\Sysnative\msconfig.exe") was not found ALL I WANNA DO IS BE ABLE TO OPEN MSCONFIG ON EVERY COMPUTER WITH A CLICK OF A BUTTON WHY SO HARD LOL

    thank if anyone can make a break in the case

  29. #29
    Frenzied Member stateofidleness's Avatar
    Join Date
    Jan 2009
    Posts
    1,780

    Re: Opening MSCONFIG

    you'll need to test the OS of the client machine before launching msconfig is different between OS's (as we've established throughout the thread)

    Using:

    vb Code:
    1. Public Function OSVersion() As String
    2.         Return Environment.OSVersion.ToString
    3.  End Function

    Then you can do a Select/Case to execute the correct Process.Start using the respective path to the msconfig for that OS.

  30. #30

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    thanks stateofidleness .... Its weird cause I am currently using a windows 7 64 bit and it will only work on this machine if I do the sysnative folder..... but on another computer that has windows 7 64 bit it wont run out of the C:\windows\system32 folder it says msconfig is not found.

    I will dig in a little further into the string you have provided and see what I can get out of it until i get stuck

  31. #31

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    I returned Microsoft Windows NT 6.1.7600.0 with that code. How should I go about figuring out the best way to execute MSCONFIG per machine? I will be dealing with mainly Windows 7 machines 32 and 64 bit. I dont care about vista

  32. #32
    Frenzied Member
    Join Date
    Mar 2005
    Location
    Sector 001
    Posts
    1,577

    Re: Opening MSCONFIG

    Get the OS version here:
    http://www.vb-helper.com/howto_net_os_version.html
    Win 7 is missing but there should be a similar solution.

    Have you tried to bring your you own copy of msconfig in the app's folder and start that?
    VB 2005, Win Xp Pro sp2

  33. #33

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    THanks that worked good for getting the OS version, Yes I have tried that MSCONFIG I think needs more files to run I will try it again and see what it says

    Thanks

  34. #34

    Thread Starter
    Member
    Join Date
    Feb 2007
    Posts
    39

    Re: Opening MSCONFIG

    Ya theres a C++ error when I try to put a copy in the folder with my application

Posting Permissions

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



Click Here to Expand Forum to Full Width