Old 30th January 2014, 17:57   #1
heinz_ketchup
Junior Member
 
Join Date: Jan 2014
Posts: 4
Question 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.
heinz_ketchup is offline   Reply With Quote
Old 30th January 2014, 17:59   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
You can use ` for the outer quotes:
ExecWait `schtasks /change /TN '"\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem"' /DISABLE`

Stu
Afrow UK is offline   Reply With Quote
Old 30th January 2014, 18:12   #3
heinz_ketchup
Junior Member
 
Join Date: Jan 2014
Posts: 4
Unhappy

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
Attached Files
File Type: nsi schtasks.nsi (1.3 KB, 166 views)
heinz_ketchup is offline   Reply With Quote
Old 30th January 2014, 18:54   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Try:
ExecWait `"$SYSDIR\schtasks.exe" /change /tn "Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem" /disable` $0

Stu
Afrow UK is offline   Reply With Quote
Old 31st January 2014, 08:56   #5
heinz_ketchup
Junior Member
 
Join Date: Jan 2014
Posts: 4
Talking

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

Last edited by heinz_ketchup; 31st January 2014 at 11:03.
heinz_ketchup is offline   Reply With Quote
Old 31st January 2014, 09:18   #6
heinz_ketchup
Junior Member
 
Join Date: Jan 2014
Posts: 4
Double, please delete. Thx

Last edited by heinz_ketchup; 31st January 2014 at 11:01.
heinz_ketchup is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
execwait, quotation marks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump