Richard Robertson Posted January 17, 2011 Posted January 17, 2011 There's gotta be a way to restart into safe mode without that program though. I'm currently researching it.
GEOSoft Posted January 18, 2011 Posted January 18, 2011 While Richard is searching, and I hope he finds it, if this is Win 7 64 bit; what happens when you click the start button and type msconfig in the search field? Does it find the file? If yes; right-click on it and select "Open File Location" to be sure of where it is. Probably system32 folder (@SystemDir on 32 bit). Since that is in the Windows path you don't have to enter the path anyway. Now to the part that may be messing you up; I seem to recall that you need Admin privileges to use MSConfig so you may have to use RunAs(). This code works for me every time but then again I have Admin privileges as the only user. $sTitle = "System Configuration" ShellExecute("msconfig", -2) WinWaitActive($sTitle) ControlClick($sTitle, "", "[CLASSNN:Button5]", "primary");; Check the "Safe Boot" box ControlClick($sTitle, "", "[CLASSNN:Button8]", "primary");; Button6 for Minimal, Button7 for Alternate Shell, Button8 for AD Repair, Button9 for Network Sleep(10000);; give it time to display for testing only ;ControlClick($sTitle, "", "[CLASSNN:Button32]", "primary");; You might need to click "Apply" here ControlClick($sTitle, "", "[CLASSNN:Button31]", "primary");; Change to Button30 for "OK" George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Moderators SmOke_N Posted January 18, 2011 Moderators Posted January 18, 2011 There's gotta be a way to restart into safe mode without that program though. I'm currently researching it.My reply really has nothing to do with "safe mode". I was merely addressing the "Run" issue. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Richard Robertson Posted January 18, 2011 Posted January 18, 2011 My reply really has nothing to do with "safe mode". I was merely addressing the "Run" issue.Yes I understand that. My reply was directed toward the "why is this not trivial" part more than your alternate Run solution.
iamtheky Posted January 18, 2011 Posted January 18, 2011 (edited) On WinXp this script will set the parameter in the boot.ini so the next time you reboot it goes directly to safe mode. However, in safe mode you must uncheck from the msconfig GUI, or you will constantly boot into safe mode.Maybe the same behavior will persist in 7$BootWrite = fileopen ("c:\boot.ini" , 1) FileWrite ($BootWrite , " /safeboot:network") FileClose ($BootWrite) exit Edited January 18, 2011 by iamtheky ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
Richard Robertson Posted January 18, 2011 Posted January 18, 2011 No. Windows Vista and newer do not use boot.ini anymore.
iamtheky Posted January 18, 2011 Posted January 18, 2011 yeah, my bad. some bcdedit action, then? bcdedit /set safeboot minimal ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__)
Richard Robertson Posted January 18, 2011 Posted January 18, 2011 I never thought of that. It's still indirect but as long as you run it as admin it should work.
gramirez Posted October 15, 2014 Posted October 15, 2014 MaxuN posted this to try this: DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1) so I did and it worked finally thanks to MaxuN my code was: DllCall("kernel32.dll", "int", "Wow64DisableWow64FsRedirection", "int", 1) ShellExecute(@WindowsDir & "System32msconfig.exe")
Moderators JLogan3o13 Posted October 15, 2014 Moderators Posted October 15, 2014 Did you see that this post is 3 years old, and the OP has not been active since the thread was started?? Please don't necro old posts; the language has grown a lot since 2011. If you have a question, please post a new thread, and describe in detail what you are trying to do. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now