Jump to content

QuickLaunch & Taskbar: Simplissimo!


Recommended Posts

Stuff it with your applications.

Run it.

Backup done.

Have it called with the "-r" or "/r" option (RunOnceEx or whatever).

Restoration done.

Basta.

* >>> Version 1.0: NEW **TESTED @RunOnceEx**:

- Bug fixed (introduced in the previous version only): the restore would hang @1st RunOnceEx because the Quick Launch folder doesn't exist yet!!!

* Features added in the previous version:

- Reg files merging: simpler & much faster. Special dedicace to Delprat. :hello:

- Now also works on Win2K. ©redit to Delprat & Yzöwl (use REGEDIT /E instead of REG EXPORT).

- Better command line option handling. ©redit to Yzöwl.

- Should be quite waterproof now.

- Submited for Yzöwl9001 certification!

* Features added in the 'almost original' version:

- Spaces-in-paths-proof, prettier & cleaner! ©redit to muiz.

- Filters out the "Upgrade" value of the ...\Streams\Desktop key to avoid possible problems.

WARNINGS:

-Of course, in backup mode, it has to be in a writable location.

-Restoring only works BEFORE Explorer starts (RunOnceEx is OK).

>> After, it will be too late: Explorer will create/use its own values, overwriting yours on logoff.

taskbar1.0.cmd

Edited by Djé
Link to comment
Share on other sites


Doesnt work here

It says ( translated with babelfish )

Invalid number of parameters of and is not recognised if an internal or external task, programme or batchbestand. and are not recognised as an internal or external task, programme or batchbestand. Wrongly: too much task rule parameters Wrongly: too much task rule parameters the system cannot find it given up resistant. There has wrongly acted during the processing of: and. The system cannot find the given up path. The system cannot find the given up path.

Link to comment
Share on other sites

Doesnt work here

It says ( translated with babelfish ) [ :wacko::blink::huh: ]

WHAT says this ? The script???

I think not: the script has no error message. Only a cute final message in bachup mode.

So could you please be more specific and tell me

-when this error occurs?

-what program causes it?

-if you have specific things in your taskbar?

You may want to attach a screenshot (of both your taskbar & the error msg), your taskbar.reg or anything relevant.

Help me to help you.

Link to comment
Share on other sites

Bugs :

1- %~dp0 doesn't have the trailing \ when the batch is located at the root of a drive 'coz it's interpreted like %~d0 (you should use ".\file.reg" wich maps to the current directory after a CD or PUSHD %~dp0)

2- REG.exe is not shipped with win2000 (you should warn users about that)

3- REG EXPORT correctly creates .reg files with the header line in it ("Windows Registry Editor Version 5.00")

4- REG EXPORT overwrites the destination .reg file (you should use two .reg files, and optionally merge them after in there's no env var)

btw, good idea ;)

Edited by Delprat
Link to comment
Share on other sites

@Delprat:

1- Here (XP home sp2), %~dp0 HAVE the trailing \ even at the drive's root.

2- Now they are warned ;) (I'll update the 1st post)

3 & 4- I think you did not get the mechanism because these are the exact 'features' that I use (or overcome):

I export 2 different files and then append one to the end of the other, avoiding to repeat the header.

BTW, .reg files are Unicode (at least on non US sytems), that is the other (hidden) trick.

[EDIT]: I apologize: there are some remains of a previous version in the file which which may have lead you to your 3rd point. :blushing: .

The above description of the process still holds.

@muiz:

Next version will be improved to take care of spaces in path (that may have been the cause of your problems)

@Everybody: I love you :P

There may be also a problem with a value exported from STREAMS\Desktop, making the other values not sticking.

This value will be removed in next version.

And BTW:

Restoring ONLY work before Explorer starts (RunOnceEx is OK): after this it will be too late, Explorer will use its own values, overwriting yours on logoff.

Edited by Djé
Link to comment
Share on other sites

2- cool :) but you did'nt update the post yet :D

4- err... yes, i read a bit to fast and didn't saw the taskbartmp.reg file. (sadly you say it's unicode, so you can't use FINDSTR)

3- no, look :

>%~dp0%REGFILE% ECHO Windows Registry Editor Version 5.00
>>%~dp0%REGFILE% ECHO.

REG EXPORT "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop" %~dp0%REGFILE%

The first two lines creates the header in %REGFILE% ; then REG EXPORT... erase %REGFILE%, making the two ECHO lines a bit... useless... redundant.

++

Edited by Delprat
Link to comment
Share on other sites

2- Done now! :whistle:

4- Well, not directly, but yes, you can use FINDSTR on the unicode export... :whistle:

3- Sorry, I've edited my previous post while your were writing yours. :whistle:

Link to comment
Share on other sites

4- Well, not directly, but yes, you can use FINDSTR on the unicode export... :whistle:

Thus all this batch-guru-powered-FOR blablabla can be "reduced" :

FOR /F "skip=1 tokens=*" %%? IN ('TYPE "%~dp0taskbarTemp.reg" ^|FINDSTR/V "^\"Upgrade\"=dword:"') DO (
CMD /U /C >>"%~dp0%REGFILE%" ECHO %%?)

becomes :

TYPE "%~dp0taskbarTemp.reg"|FINDSTR/V/I "^\"Upgrade\"=dword:"|FIND /V /I "Windows Registry Editor V5.00">>"%~dp0%REGFILE%"

sounds better, isn't it ?

++

Edited by Delprat
Link to comment
Share on other sites

TYPE "%~dp0taskbarTemp.reg"|FINDSTR/V/I "^\"Upgrade\"=dword:"|FIND /V /I "Windows Registry Editor V5.00">>"%~dp0%REGFILE%"

See? Everybody can use FINDSTR on a unicode file! :P

sounds better, isn't it ?

Well, it may sound better, but what about looking better? :D

And I'm not talking about mixing FINDSTR & FIND, nor about the useless information displayed by FINDSTR in the middle of the screen output...

...Did you check the result :rolleyes: ? Nice Chinese characters, aren't they? :whistle:

やっぱり。!

Now you're probably true: this FOR instruction may not be necessary.

But you'll have to finish what you've started!

[EDIT] After toying a bit with your proposition, it appears that you may not even be true:

Only the magic of the FOR (may it be with youce!) seems powerful enough to make FINDSTR work on Unicode streams.

[EDIT2] I apologize. After toying much more with your proposition, it appears that you may well be true:

First post is updated with a new version exempt of any FOR loop ... and even improved, thanks to Yzöwl's advices.

Now, sorry but I'm not sure it is a 'reduced' version, nor that it is less 'batch-guru-powered'.

Edited by Djé
Link to comment
Share on other sites

Well, it may sound better, but what about looking better? :D

And I'm not talking about mixing FINDSTR & FIND, nor about the useless information displayed by FINDSTR in the middle of the screen output...

...Did you check the result :rolleyes: ? Nice Chinese characters, aren't they? :whistle:

やっぱり。 !

i didn't tested the batch itself, but on my system the line i gave you is fully working. No strange characters...

This new version is too complicated : i can't allow it to run on my system, even for tests :P

Link to comment
Share on other sites

i didn't tested the batch itself, but on my system the line i gave you is fully working. No strange characters...

That's interesting! What system is that? win2k? Did you test it on Unicode files? Are your registry exports (reg or regedit) in unicode format? Do they really have 'V5.00' instead of 'Version 5.00' in the header? Can your CMD.EXE read/write unicode without the /U switch?

This new version is too complicated : i can't allow it to run on my system, even for tests :P

Oh I see: You like simple things. Your system must be MacOS! :w00t:

Link to comment
Share on other sites

>> That's interesting!

interesting ? did you said "interesting" ? Now, this discussion is really bizarre...

>> What system is that? win2k?

Microsoft ® Windows XP édition familliale

version 5.1, numéro 2600.xpsp_sp2_gdr.050301-1519 : Service Pack 2

OEM shipped by "le marchand du coin d'la rue"

>> Did you test it on Unicode files? Are your registry exports (reg or regedit) in unicode format?

I tested on .reg created by REG EXPORT and REGEDIT /E (forgotten switch since ages !!! lol). I beleive they are unicode. If not, why would i check ?

>> Do they really have 'V5.00' instead of 'Version 5.00' in the header?

:lol: :lol: i tested without "V.5.00" and typed that after.

>> Can your CMD.EXE read/write unicode without the /U switch?

I don't care since REG & regedit are able to import ansi files, even without "REGEDIT4"...

>> Oh I see: You like simple things. Your system must be MacOS!

Yeaaahhh ! i like "point-n-click".

guess what ? Duke nukem 3d is the best game ever made... i have it in a little 320x240 dosbox on my enormous 1280x1024 desktop...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...