Skip to content
⌘ NSIS Forum Archive

Using ExecWait with quotation marks in command

6 posts

heinz_ketchup#

Using ExecWait with quotation marks in command

Hi there all,

I cant find the correct term to run in ExecWait.
The comand line is working:

c:\windows\system32\schtasks /change /TN "\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem" /DISABLE


I tried to include it in my script by I didnt find the right term. I tried:

ExecWait '"$SYSDIR\schtasks" /change /TN "\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem" /DISABLE' $0
or
StrCpy $1 "\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem"
ExecWait '"$SYSDIR\schtasks" /change /TN' "$1" /DISABLE' $0

Can anybody give me a hand?

Thank you.
Afrow UK#
You can use ` for the outer quotes:
ExecWait `schtasks /change /TN '"\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem"' /DISABLE`

Stu
heinz_ketchup#
Whow ! How fast you are ! Thank you.

Unfortunately it is not working. Its possible to compile now, but log shows an error.

I wrote it like this:

ExecWait `$SYSDIR\schtasks /change /TN "\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem" /DISABLE` $0

is there anything wrong with it?

After running the scriopt die log appears:

Execute: C:\Windows\system32\schtasks /change /TN '"\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem"' /DISABLE
Result: -502655360
Completed

See also attached file line 46
Afrow UK#
Try:
ExecWait `"$SYSDIR\schtasks.exe" /change /tn "Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem" /disable` $0

Stu
heinz_ketchup#edited
hurray,

stu, you are the best! many many thanks ! I was really on the verge of giving up and to find a other, not that confortable solution. I note on my skript commend (sorry, its german): "vielen vielen Dank an Stu (Afrow UK) von den http://forums.winamp.com/'Winamp Forums > Developer Center > NSIS Discussion'

For all other who read this thread cause they having the same problem. The right term is:


ExecWait `"$SYSDIR\schtasks.exe" /change /tn "Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem" /disable` $0



Many greetings from Germany