Page 1 of 1

stupid problem with script

Posted: 13 May 2014 10:20
by swan_x
i have one script with 2 functions:
backupto "D:\apps\abc\", C:\efr\augu\augu\user\current\AppData\Roaming\abc\updates.dat|C:\efr\augu\augu\user\current\AppData\Roaming\abc\gggg.exe", 2, 0, 0, 0, 0, 0, 0; delete 0,0, "D:\ururs\oubis\sismgf\*.*"; run """%ComSpec%"" /c reg delete ""HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall"" /f", , 0, 1;

my problem is the key is not deleted! but if run the script with only run """%ComSpec%"" /c reg delete ""HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall"" /f", , 0, 1;
work correctly! why this??

Re: stupid problem with script

Posted: 13 May 2014 12:38
by Stefan
quoting




 

Re: stupid problem with script

Posted: 13 May 2014 13:19
by PeterH
You can try to test by adding a Step; instruction in front of the run command - and look at the output.

Re: stupid problem with script

Posted: 13 May 2014 15:00
by swan_x
on "step mode" all work correctly...
now i have re-tried and all work...sometimes work, sometimes this key is not deleted!

Re: stupid problem with script

Posted: 13 May 2014 16:00
by Stefan
Did you have tried with correct quoting?
swan_x wrote:backupto "D:\apps\abc\", C:\efr\augu\au...\abc\gggg.exe", 2, 0, 0, 0, 0, 0, 0;

.

Re: stupid problem with script

Posted: 13 May 2014 17:08
by swan_x
yes, sorry, i have selected and copy all my script, but i don't know...
correct is:
backupto "D:\apps\abc\", "C:\efr\augu\au...\abc\gggg.exe", 2, 0, 0, 0, 0, 0, 0;
but the problem is not here (backupto) but in the second part (reg delete)...

Re: stupid problem with script

Posted: 16 May 2014 10:31
by swan_x
solved! now i understand my problem! :biggrin:
the key to be deleted is created after...then the script needs to be run in two stages! :kidding:
sorry for my confusion! :roll: