|
-
Oct 16th, 2010, 08:28 PM
#1
Thread Starter
Member
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
-
Oct 16th, 2010, 08:46 PM
#2
Re: Opening MSCONFIG
Process.Start("MSConfig.exe")
-
Oct 16th, 2010, 08:48 PM
#3
Frenzied Member
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:
Process.Start("path of file")
If you want to open the Msconfig use
Vb.net Code:
Process.Start("C:\Windows\System32\msconfig.exe")
-
Oct 16th, 2010, 08:49 PM
#4
Thread Starter
Member
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
-
Oct 16th, 2010, 08:50 PM
#5
Thread Starter
Member
Re: Opening MSCONFIG
Pc not Mac same thing same error
-
Oct 16th, 2010, 08:59 PM
#6
Frenzied Member
Re: Opening MSCONFIG
Make a little batch file:
Batch Code:
call "C:\Windows\System32\msconfig.exe"
Does the Msconfig show?
Also make sure you are running it as Admin.
-
Oct 16th, 2010, 09:04 PM
#7
Thread Starter
Member
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
-
Oct 16th, 2010, 09:09 PM
#8
Frenzied Member
Re: Opening MSCONFIG
Open the Windows32 folder and locate the Msconfig.exe file and open it.
Does it open?
-
Oct 16th, 2010, 09:15 PM
#9
Thread Starter
Member
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
-
Oct 16th, 2010, 09:21 PM
#10
Frenzied Member
Re: Opening MSCONFIG
[QUOTE=Servtex]Any way around the running as administrator through vb?[/QUOTE
No, not in visual basic.
Has nothing do with the app running as admin.
-
Oct 16th, 2010, 09:27 PM
#11
Thread Starter
Member
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
-
Oct 16th, 2010, 09:32 PM
#12
Frenzied Member
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?
-
Oct 16th, 2010, 10:18 PM
#13
-
Oct 16th, 2010, 10:34 PM
#14
Thread Starter
Member
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
-
Oct 16th, 2010, 10:42 PM
#15
Re: Opening MSCONFIG
That is the one OS I don't have on a virtul machine 
Probably has to do with some security restrictions.
-
Oct 16th, 2010, 10:48 PM
#16
Thread Starter
Member
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
-
Oct 17th, 2010, 12:15 AM
#17
Re: Opening MSCONFIG
 Originally Posted by Servtex
 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
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Oct 17th, 2010, 09:09 AM
#18
Thread Starter
Member
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
-
Oct 17th, 2010, 06:28 PM
#19
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.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Oct 17th, 2010, 07:09 PM
#20
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")
-
Oct 17th, 2010, 07:27 PM
#21
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.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Oct 17th, 2010, 07:33 PM
#22
Lively Member
Re: Opening MSCONFIG
 Originally Posted by sapator
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.
-
Oct 17th, 2010, 07:46 PM
#23
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.
-
Oct 17th, 2010, 07:56 PM
#24
Lively Member
Re: Opening MSCONFIG
 Originally Posted by Half
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
-
Oct 17th, 2010, 08:01 PM
#25
Lively Member
Re: Opening MSCONFIG
Found the solution, you have to run it as
vb Code:
Process.Start("C:\Windows\Sysnative\msconfig.exe")
-
Oct 18th, 2010, 06:20 PM
#26
Thread Starter
Member
Re: Opening MSCONFIG
Thanks everyone for the help I will be testing a few of your methods tonight
-
Oct 18th, 2010, 06:23 PM
#27
Thread Starter
Member
Re: Opening MSCONFIG
 Originally Posted by SickFinga
Found the solution, you have to run it as
vb Code:
Process.Start("C:\Windows\Sysnative\msconfig.exe")
PERFECT so far everything is working out as planned. I can't say it enough THANK YOU
-
Oct 31st, 2010, 07:14 PM
#28
Thread Starter
Member
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
-
Oct 31st, 2010, 09:08 PM
#29
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:
Public Function OSVersion() As String Return Environment.OSVersion.ToString 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.
-
Nov 1st, 2010, 03:52 PM
#30
Thread Starter
Member
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
-
Nov 1st, 2010, 04:09 PM
#31
Thread Starter
Member
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
-
Nov 2nd, 2010, 03:16 PM
#32
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?
-
Nov 2nd, 2010, 09:48 PM
#33
Thread Starter
Member
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
-
Nov 3rd, 2010, 06:47 PM
#34
Thread Starter
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|