Sign in to follow this  
Followers 0
insomnai

MSCONFIG issues

8 posts in this topic

I've searched on the forum and found other posts with regards to this, but i've found a little hiccup that could use an assist with.

I'm trying to use the following code, and depending on which way the exe is compiled, it works, or it doesn't! This code runs during a 'while' loop is running on a button.

Run(@HomeDrive & "\windows\system32\msconfig.exe")

If I compile the exe in x64 mode, the script works on x64 machines but not x86 machines. If it is compiled on x86 mode, it runs on x86 machines but not x64 machines.

Wierd thing is, the path i've used is the same on both x86 and x64 machines so theoretically should work on both regardless of how I compile the exe.

Thanks guys and gals.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I also ran into the exact same problem about a year ago. It seems to be a bug with launching msconfig on Win7. I never found a good solution. This was my band-aid:

If FileExists(@WindowsDir & "\pchealth\helpctr\binaries\msconfig.exe") Then
    Run(@WindowsDir & "\pchealth\helpctr\binaries\msconfig.exe")
Else
    Send("{LWINDOWN}r{LWINUP}")
    WinWaitActive("Run", "")
    Send("msconfig{ENTER}")
EndIf
Edited by sleepydvdr

#include <ByteMe.au3>

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thank you both for your responses! It does seem as though there is a bit of an issue on Windows 7 machines, I wonder if this will be the same on the Windows Developer Preview or Windows 8 when it's finally released next year. I think I will try Yashied's method first, only because it doesn't involve using send commands, I'm trying to reduce my usage of them. Again, thank you very much! Yashied, could you explain what is happening with your code here? Many thanks...

Edited by insomnai

Share this post


Link to post
Share on other sites

You guys (insomnai, sleepydvdr) need to read the File System Redirector part of Programming Guide for 64-bit Windows. Actually, if you think you'll ever do another script for a x64 OS, read the whole guide (especially the Running 32-bit Applications part).

This is all really basic if you just check the documentation.

2 people like this

Share this post


Link to post
Share on other sites

You guys (insomnai, sleepydvdr) need to read the File System Redirector part of Programming Guide for 64-bit Windows. Actually, if you think you'll ever do another script for a x64 OS, read the whole guide (especially the Running 32-bit Applications part).

This is all really basic if you just check the documentation.

I've only just started using the AutoIT scripting to create exe's so i'm currently learning on the fly and never had a reason to look at that page, however it is a great start so thank you for pointing it out!

Share this post


Link to post
Share on other sites

Hey guys, seconday question on this, by blocking redirection etc, do I compile this as x86 or x64...?

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

If you have disabled the redirect then i guess x86 should be fine

heres mine

#requireadmin
DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1)
ShellExecute('msconfig.exe', -4) ; << 4 = which tab to display
DllCall("kernel32.dll", "int", "Wow64EnableWow64FsRedirection", "int", 1)
RegDelete("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "MSConfig") ; << stops the message after reboot

Typo

Edited by Chimaera

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0