stupid problem with script

Discuss and share scripts and script files...
Post Reply
swan_x
Posts: 321
Joined: 08 Oct 2009 12:27

stupid problem with script

Post 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??

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: stupid problem with script

Post by Stefan »

quoting




 

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: stupid problem with script

Post by PeterH »

You can try to test by adding a Step; instruction in front of the run command - and look at the output.
Win11 Pro 223H2 Gerrman

swan_x
Posts: 321
Joined: 08 Oct 2009 12:27

Re: stupid problem with script

Post 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!

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: stupid problem with script

Post 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;

.

swan_x
Posts: 321
Joined: 08 Oct 2009 12:27

Re: stupid problem with script

Post 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)...

swan_x
Posts: 321
Joined: 08 Oct 2009 12:27

Re: stupid problem with script

Post 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:

Post Reply