how goto safe mode?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

how goto safe mode?

#1 Post by r2du-soft » 22 Aug 2012 16:28

how can creat batch file and when open that batch file,restart Pc AND Pc goto safe mode?
tanks

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: how goto safe mode?

#2 Post by abc0502 » 22 Aug 2012 17:47

windows 7 or xp ?

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: how goto safe mode?

#3 Post by r2du-soft » 23 Aug 2012 08:16

in all windows (xp-7-8-vista)

I've tested this way:

start\run\msconfig\ BOOT \ SAFE MODE

but But it is not fun :!:

I'm a programmer , And to run some programs , I need a program by start in safe mode.
For Easily users This way Not over AND Completely not action.
I want in the program Set a Button till user when click on that Button , PC restart & automatic goto safemode :!:

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: how goto safe mode?

#4 Post by abc0502 » 23 Aug 2012 10:07

Well, In XP it is a lot easier,
XP uses an ini file named Boot.ini located in windows drive, all what you have to do is just add the word "/safeboot at the last line after "/fastedetect" and restart the pc, it will go direct to the safe mode.

in later windows version, i don't know what file 7, vista or 8 uses

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: how goto safe mode?

#5 Post by r2du-soft » 23 Aug 2012 11:29

thanks abc0502

in windows 7 our 8 Should add a key in registry But First Set this key:

Code: Select all

HKEY_LOCAL_MACHINE\BCD00000000\Objects\{9dea862c-5cdd-4e70-acc1-f32b344d4795}\Elements\

set "full Control"


if no set in "full Control" when add key See this Error

Image



but I do not How set "full Control" to this key!!!!

For set "full Control" Manual this key:
1-start menu
2-run
3-Regedit
4- GO TO KEY (HKEY_LOCAL_MACHINE\BCD00000000\Objects\{9dea862c-5cdd-4e70-acc1-f32b344d4795}\Elements\)

5-LOOKUP PICTURE

picture 1:
Image
picture 2:
Image
picture 3:
Image


now can add reg!!

But I need Way Automatic set a key Address to "full Control" !!!

im how Do this Work With Doc ??

abc0502
Posts: 1007
Joined: 26 Oct 2011 22:38
Location: Egypt

Re: how goto safe mode?

#6 Post by abc0502 » 23 Aug 2012 14:12

Hi,
I think this could help getting the permissions you need
Use a Script to Change Registry Permissions from the Command Line
How to change registry values or permissions from a command line or a script
and this to see how to use the Regini.exe
http://support.microsoft.com/kb/237607

See this, talks about a vbscript to gain access to Reg keys
http://www.edugeek.net/forums/windows/23744-changing-permissions-registry-key.html

and finally another Vbscript
http://blogs.msdn.com/b/alejacma/archive/2008/03/11/how-to-change-registry-permissions-with-regini-exe-vbscript.aspx

Ed Dyreen
Expert
Posts: 1569
Joined: 16 May 2011 08:21
Location: Flanders(Belgium)
Contact:

Re: how goto safe mode?

#7 Post by Ed Dyreen » 23 Aug 2012 15:16

'
unLike i/cacls, which only works on directories &files or regini.EXE which only works for registry keys,
setACL.EXE changes AccesControlLists on directories, files, registry keys, services, printers and Network shares.

Code: Select all

@echo off

:: Set the owner to trustee recursive
setACL.exe -on "HKLM\Software\ED" -ot reg -actn setowner -ownr "n:Administrators" -rec yes

:: Reset permissions on all sub-objects and enable propagation of inherited permissions.
setACL.exe -on "HKLM\Software\ED" -ot reg -actn rstchldrn -rst "dacl,sacl"

:: Process ACEs specified by parameter Administrators full
setACL.exe -on "HKLM\Software\ED" -ot reg -actn ace -ace "n:Administrators;p:full;m:set"

:: Process ACEs specified by parameter Gebruikers full
setACL.exe -on "HKLM\Software\ED" -ot reg -actn ace -ace "n:Gebruikers;p:full;m:set"

:: Process ACEs specified by parameter Gasten full
setACL.exe -on "HKLM\Software\ED" -ot reg -actn ace -ace "n:Gasten;p:full;m:set"

pause
exit
Definetly my favorite for managing AccesControlLists :D

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: how goto safe mode?

#8 Post by r2du-soft » 24 Aug 2012 02:02

im not work with:

Code: Select all

Hi,
I think this could help getting the permissions you need
Use a Script to Change Registry Permissions from the Command Line
How to change registry values or permissions from a command line or a script
and this to see how to use the Regini.exe
http://support.microsoft.com/kb/237607

See this, talks about a vbscript to gain access to Reg keys
http://www.edugeek.net/forums/windows/23744-changing-permissions-registry-key.html

and finally another Vbscript
http://blogs.msdn.com/b/alejacma/archive/2008/03/11/how-to-change-registry-permissions-with-regini-exe-vbscript.aspx



But this work Excellent:

Code: Select all

unLike i/cacls, which only works on directories &files or regini.EXE which only works for registry keys,
setACL.EXE changes AccesControlLists on directories, files, registry keys, services, printers and Network shares.
Code:
@echo off

:: Set the owner to trustee recursive
setACL.exe -on "HKLM\Software\ED" -ot reg -actn setowner -ownr "n:Administrators" -rec yes

:: Reset permissions on all sub-objects and enable propagation of inherited permissions.
setACL.exe -on "HKLM\Software\ED" -ot reg -actn rstchldrn -rst "dacl,sacl"

:: Process ACEs specified by parameter Administrators full
setACL.exe -on "HKLM\Software\ED" -ot reg -actn ace -ace "n:Administrators;p:full;m:set"

:: Process ACEs specified by parameter Gebruikers full
setACL.exe -on "HKLM\Software\ED" -ot reg -actn ace -ace "n:Gebruikers;p:full;m:set"

:: Process ACEs specified by parameter Gasten full
setACL.exe -on "HKLM\Software\ED" -ot reg -actn ace -ace "n:Gasten;p:full;m:set"

pause
exit
Definetly my favorite for managing AccesControlLists :D


BUT!!!!!:
how How is that no files setACL.exe Do this work? [ No background file(setACL.exe) and Just with code doc? ]

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: how goto safe mode?

#9 Post by r2du-soft » 25 Aug 2012 11:09

Anybody NOT HELP MI?

Dos_Probie
Posts: 233
Joined: 21 Nov 2010 08:07
Location: At My Computer

Re: how goto safe mode?

#10 Post by Dos_Probie » 26 Aug 2012 18:46

Code: Select all

@echo off

:: Set the owner to trustee recursive
setACL.exe -on "HKLM\Software\ED" -ot reg -actn setowner -ownr "n:Administrators" -rec yes

:: Reset permissions on all sub-objects and enable propagation of inherited permissions.
setACL.exe -on "HKLM\Software\ED" -ot reg -actn rstchldrn -rst "dacl,sacl"

:: Process ACEs specified by parameter Administrators full
setACL.exe -on "HKLM\Software\ED" -ot reg -actn ace -ace "n:Administrators;p:full;m:set"

:: Process ACEs specified by parameter Gebruikers full
setACL.exe -on "HKLM\Software\ED" -ot reg -actn ace -ace "n:Gebruikers;p:full;m:set"

:: Process ACEs specified by parameter Gasten full
setACL.exe -on "HKLM\Software\ED" -ot reg -actn ace -ace "n:Gasten;p:full;m:set"

pause
exit


Ed, I d/l SetACL.exe to system32 and changed Ed to my user name but keep getting the following error message..
if you or anyone has any ideas i am open to suggestions..

SetACL finished with errors<s>:
SetACL error message: The call to GetNamedSecurityInfo <> failed
Operating system error message: The system cannont find the file specified.

r2du-soft
Posts: 68
Joined: 09 Sep 2011 12:13

Re: how goto safe mode?

#11 Post by r2du-soft » 27 Aug 2012 01:12

Not
I make no setACL program. And only code make this program

Dos_Probie
Posts: 233
Joined: 21 Nov 2010 08:07
Location: At My Computer

Re: how goto safe mode?

#12 Post by Dos_Probie » 27 Aug 2012 04:22

r2du... I replied back to "ED" about his code, and not back to you.. sorry if
you misunderstood.. btw Where are you from?

[code][Ed, I d/l SetACL.exe to system32 and changed Ed to my user name but keep getting the following error message..
if you or anyone has any ideas i am open to suggestions..

/code]

Post Reply