- NSIS Discussion
- Shell a command In dos with Nsis In 64Bit System
Archive: Shell a command In dos with Nsis In 64Bit System
r2du-soft
16th November 2013 13:47 UTC
Shell a command In dos with Nsis In 64Bit System
hi
How Shell A command in Dos With Nsis?!
this codes not Work:
Exec 'bcdedit /set {current} safeboot Minimal'
nsExes::Exec 'bcdedit /set {current} safeboot Minimal'
ExecCmd::exec 'bcdedit /set {current} safeboot Minimal'
ExecDos::exec 'bcdedit /set {current} safeboot Minimal'
?
r2du-soft
17th November 2013 13:01 UTC
Nobody here can not help me?
DrO
17th November 2013 13:44 UTC
it's the weekend and so replies (if any are going to come) are not likely until the normal working week starts + it can take a few days to get a reply at times (am only replying to say that, i've no idea about your actual question).
Anders
17th November 2013 17:35 UTC
Originally posted by r2du-soft
Nobody here can not help me?
You don't provide any useful information so how do you expect to get help?
How does it fail? Error messages?
r2du-soft
17th November 2013 19:54 UTC
tanks Guys
when start nsis program whit this codes:
Exec '"bcdedit" /set {current} safeboot Minimal'
Exec '"bcdedit.exe" /set {current} safeboot Minimal'
Exec 'cmd.exe /k "bcdedit" /set {current} safeboot Minimal'
Exec 'cmd.exe /k "bcdedit.exe" /set {current} safeboot Minimal'
cmd Show This Error:
http://upload7.ir/images/44640093689033879671.jpg
i Think "Exec" Not Work In Windows 64 Bit! , But Can used Replace Another source code to Exec The Work This Program? or Fix Exec Code?!
tanks
Anders
18th November 2013 06:15 UTC
Use the full path to bcdedit?
r2du-soft
18th November 2013 08:32 UTC
yes i test this:
Exec '"c:\windows\system32\bcdedit" /set {current} safeboot Minimal'
Exec '"c:\windows\system32\bcdedit.exe" /set {current} safeboot Minimal'
Exec 'cmd.exe /k "c:\windows\system32\bcdedit" /set {current} safeboot Minimal'
Exec 'cmd.exe /k "c:\windows\system32\bcdedit.exe" /set {current} safeboot Minimal'
but not work
Anders
18th November 2013 08:45 UTC
Try $windir\sysnative\bcdedit.exe
r2du-soft
18th November 2013 13:39 UTC
Originally posted by Anders
Try $windir\sysnative\bcdedit.exe
This Not Worked
But I Find A way For Worked! But this is not consistent!!
If Copy 'bcdedit.exe' from "C:\Windows\System32" To "C:\' and used this code:
Exec 'CMD.exe /k "c:\bcdedit.exe" /set {current} safeboot Minimal'
then Program Worked!
i think Because the patch file bcdedit.exe is long (C:\windows\system32) The program could not find the file.
Also i test this code for Short path:
Exec 'CMD.exe /k "$SYSDIR\bcdedit.exe" /set {current} safeboot Minimal'
But Cmd Say
"
http://upload7.ir/images/41308754608529501729.jpg
"
Is there a way to fix this problem؟؟؟؟
Anders
18th November 2013 14:31 UTC
Filesystem redirection is getting in the way, you probably need a 64bit helper application that calls bcdedit for you...
r2du-soft
18th November 2013 14:49 UTC
Originally posted by Anders
Filesystem redirection is getting in the way, you probably need a 64bit helper application that calls bcdedit for you...
How do it?
r2du-soft
18th November 2013 15:32 UTC
:cry: :cry: :cry: :cry: :cry: :cry: :cry:
This Codes Not Work on Windows 64 Bit
CopyFiles $Sysdir\bcdedit.exe $Windir
CopyFiles $Sysdir\bcdedit.exe C:\
CopyFiles C:\Windows\System32\bcdedit.exe C:\
:cry: :cry: :cry: :cry: :cry: :cry: :cry:
When Start Program:
Copy Failed
r2du-soft
18th November 2013 16:42 UTC
yeeeeeeeeee
I Can Fix THIS!!!!!!
!include "x64.nsh"
Section
${DisableX64FSRedirection}
Exec '"bcdedit" /set {current} safeboot Minimal'
Sectionend
Tanks guys
Anders
18th November 2013 18:42 UTC
That is not really a good solution because dll loading can fail when you disable the redirection. At least turn the redirection back on after the Exec...
r2du-soft
18th November 2013 19:31 UTC
Originally posted by Anders
That is not really a good solution because dll loading can fail when you disable the redirection. At least turn the redirection back on after the Exec...
Yes
When Finished Work ,Also Can Again Enabled , When are Done , Whit code:
${EnableX64FSRedirection}