Starter to make TC portable
Moderators: Hacker, petermad, Stefan2, white
Starter to make TC portable
TC-Start V0.0.4
Programm to make TC portable with working settings or to fix missing or wrong entries after an rollback or reinstall of the os.
Edits are done in the registry and the WinCmd.iNi, to match your TC installation.
it's fully programmed using Visual Basic 6 and is shrinked using UPX 3.03w. it consists only of 2 files. The executable and the language resource file.
Functions:
- check for admin rights
- check for write access
- check for an already running TotalCmd.EXE
- choice to kill an already running TC instance
- double start of TC-Start or same TC prohibited
- choice to start local TC, that was found through the registry entries
- "show file version" for local and mobile TC to make choice easier (read from TC executable)
- choice to fix registry entries that point to no valid TC installation
- choice to delete invalid registry entries
- detection if TC was started from an local HD
- choice to add permanent registry entries if none was found and TC-Start was started from an local HD
- starting TC using parameters if registry entries are found (no matter if valid or not, choice to delete or fix them are shown earlier)
- adding registry entries if none was found and TC was started from an mobile device
- RegPrint to sign added registry entries as useless if TS-Start or the PC crashed
- automatic deleting of registry entries with RegPrint from TC-Start
- automatic unloading of TC-Start if TC is started using parameters or with valid reg entries
- "Trayicon only" for TC-Start, after registry entries has been added to remove them afterwards
- automatic unloading of TC-Start if the TC, that was started using it, has been closed
Most functions are realised using APi calls so no additional files should be needed. Was tested on different Windows XP PC's without having VS6 or any other VB installed and it ran with the standart files, XP delivers. Should be the same on Win98/ME/2k, but maybe different on Vista.
ChangeLog:
0.0.4:
- fixed a minor bug, that caused a parameterstart, when it's not needed
0.0.3:
- integrated a function to detect, if TC was started from an local HD
(will offer an option to add permanent registry entries, to keep TC-Start from staying in memory if an local installation is started using it)
- integrated Trayicon
(just to keep your taskbar clean)
0.0.2:
- removed backupsystem
- removed RegPatch if an local TC is found
- included parameterstart if an local TC is found
- added RegFix function for wrong registry entries
thanks to m^2, for helping me realise this more failsafe system
- included TC-Start RegPrint to remove useless entries if TC-Start or PC crashed
(if you start TC-Start again after the crash, these entries will be deleted to avoid stupid questions)
- fixed bug with switched yes/no buttons in DelReg question
0.0.1:
- first release
Download Link: TC-Start V0.0.4 Size: 49KB
MD5: 63c122f22f8caa1b7aa2566d749f4fbd / MD5 file
P.s.: if you get an virus warning, don't hesitate. it's because i used UPX (means you can unshrink it again, to get rid of this warning).
P.p.s.: Regarding my version numer system.
My first stable and tested release is always V0.0.1.
Ya i know, it's kinda confusing. But unstable releases got an letter in the version number. 0.0.2a for example. When the letter is removed, the number will increase.
No letter here. So it's tested an stable. But there's still no gurantee that it's bug free.
Programm to make TC portable with working settings or to fix missing or wrong entries after an rollback or reinstall of the os.
Edits are done in the registry and the WinCmd.iNi, to match your TC installation.
it's fully programmed using Visual Basic 6 and is shrinked using UPX 3.03w. it consists only of 2 files. The executable and the language resource file.
Functions:
- check for admin rights
- check for write access
- check for an already running TotalCmd.EXE
- choice to kill an already running TC instance
- double start of TC-Start or same TC prohibited
- choice to start local TC, that was found through the registry entries
- "show file version" for local and mobile TC to make choice easier (read from TC executable)
- choice to fix registry entries that point to no valid TC installation
- choice to delete invalid registry entries
- detection if TC was started from an local HD
- choice to add permanent registry entries if none was found and TC-Start was started from an local HD
- starting TC using parameters if registry entries are found (no matter if valid or not, choice to delete or fix them are shown earlier)
- adding registry entries if none was found and TC was started from an mobile device
- RegPrint to sign added registry entries as useless if TS-Start or the PC crashed
- automatic deleting of registry entries with RegPrint from TC-Start
- automatic unloading of TC-Start if TC is started using parameters or with valid reg entries
- "Trayicon only" for TC-Start, after registry entries has been added to remove them afterwards
- automatic unloading of TC-Start if the TC, that was started using it, has been closed
Most functions are realised using APi calls so no additional files should be needed. Was tested on different Windows XP PC's without having VS6 or any other VB installed and it ran with the standart files, XP delivers. Should be the same on Win98/ME/2k, but maybe different on Vista.
ChangeLog:
0.0.4:
- fixed a minor bug, that caused a parameterstart, when it's not needed
0.0.3:
- integrated a function to detect, if TC was started from an local HD
(will offer an option to add permanent registry entries, to keep TC-Start from staying in memory if an local installation is started using it)
- integrated Trayicon
(just to keep your taskbar clean)
0.0.2:
- removed backupsystem
- removed RegPatch if an local TC is found
- included parameterstart if an local TC is found
- added RegFix function for wrong registry entries
thanks to m^2, for helping me realise this more failsafe system
- included TC-Start RegPrint to remove useless entries if TC-Start or PC crashed
(if you start TC-Start again after the crash, these entries will be deleted to avoid stupid questions)
- fixed bug with switched yes/no buttons in DelReg question
0.0.1:
- first release
Download Link: TC-Start V0.0.4 Size: 49KB
MD5: 63c122f22f8caa1b7aa2566d749f4fbd / MD5 file
P.s.: if you get an virus warning, don't hesitate. it's because i used UPX (means you can unshrink it again, to get rid of this warning).
P.p.s.: Regarding my version numer system.
My first stable and tested release is always V0.0.1.
Ya i know, it's kinda confusing. But unstable releases got an letter in the version number. 0.0.2a for example. When the letter is removed, the number will increase.
No letter here. So it's tested an stable. But there's still no gurantee that it's bug free.
Last edited by CG! on 2008-11-29, 00:30 UTC, edited 31 times in total.
Mmhhh... some downloads but no feedback.
Maybe it's working without problems. Cool. ^^
Since i'm depending on feedback, like it's crap, missing or useless stuff, i hope to get some feedback from you guys.
At the the moment i'm thinking about including parameter support to it, so they can be handed over to TC.
Usefull if you start TC with this prog using AutoRun.iNF.
Maybe some programm intern parameters too.
AutoRun.iNF example (intern parameter):
forces TC to show it's starting path after loading
Maybe it's working without problems. Cool. ^^
Since i'm depending on feedback, like it's crap, missing or useless stuff, i hope to get some feedback from you guys.
At the the moment i'm thinking about including parameter support to it, so they can be handed over to TC.
Usefull if you start TC with this prog using AutoRun.iNF.
Maybe some programm intern parameters too.
AutoRun.iNF example (intern parameter):
Code: Select all
[AutoRun]
Label=TotalCommander V7.04a
icon=TotalCommander\TC-Start.EXE
Open=TotalCommander\TC-Start.EXE -tcd
@ghisler:
is it possible to set the "InstallDir" entry in the WinCmd.iNi to %Commander_Path%?
This would mean, i only need to edit/add the registry entries.
Or is it needed to have the full path in it for some things?
@all people interessted:
if there's enough interesst, i can include an full TC2Mobile routine into this prog.
This would read the iNi, Menue and Buttonbars and copy all linked programs along with the TC to the choosen device and path, making the entries point to %Commander_Path%.
So if you got a link to C:\Program Files\WinRAR\WinRAR.EXE in your Menu or Buttonbar f.e., it would move it and make it point to %Commander_Path%\AddOns\WinRAR\WinRAR.EXE.
Or any other ideas? i'm open for suggestions.
is it possible to set the "InstallDir" entry in the WinCmd.iNi to %Commander_Path%?
This would mean, i only need to edit/add the registry entries.
Or is it needed to have the full path in it for some things?
@all people interessted:
if there's enough interesst, i can include an full TC2Mobile routine into this prog.
This would read the iNi, Menue and Buttonbars and copy all linked programs along with the TC to the choosen device and path, making the entries point to %Commander_Path%.
So if you got a link to C:\Program Files\WinRAR\WinRAR.EXE in your Menu or Buttonbar f.e., it would move it and make it point to %Commander_Path%\AddOns\WinRAR\WinRAR.EXE.
Or any other ideas? i'm open for suggestions.
Why do you play with the registry?CG! wrote:@ghisler:
is it possible to set the "InstallDir" entry in the WinCmd.iNi to %Commander_Path%?
This would mean, i only need to edit/add the registry entries.
Or is it needed to have the full path in it for some things?
@all people interessted:
if there's enough interesst, i can include an full TC2Mobile routine into this prog.
This would read the iNi, Menue and Buttonbars and copy all linked programs along with the TC to the choosen device and path, making the entries point to %Commander_Path%.
So if you got a link to C:\Program Files\WinRAR\WinRAR.EXE in your Menu or Buttonbar f.e., it would move it and make it point to %Commander_Path%\AddOns\WinRAR\WinRAR.EXE.
Or any other ideas? i'm open for suggestions.
http://www.ghisler.ch/wiki/index.php/Wincmd.ini
Search for UseIniInProgramDir.
Calling
Code: Select all
totalcmd.exe /i=path_to_wincmd_ini /f=path_to_wcx_ftp_ini
I didn't look at your tool, but there are others that seem to do the same like this one. You might find some here too.
To avoid the use of these parameters, because some progs use the registry to find the TC directory.m^2 wrote:Why do you play with the registry?
By editing/adding the standart values, i can keep it as compatible as possible.
Like i wrote: it's one i made and i didn't check for other such programs.m^2 wrote:I didn't look at your tool, but there are others that seem to do the same like this one. You might find some here too.
i want to advance it's features anyway, if enough people are interessted.
Almost anything can be realised, so i'm open for suggestions.
Could you post an example of such tool? I can't remind any.CG! wrote:To avoid the use of these parameters, because some progs use the registry to find the TC directory.m^2 wrote:Why do you play with the registry?
By editing/adding the standart values, i can keep it as compatible as possible.
OK, you might have slightly better compatibility, but you trade security as you can never assure that you'll be able to clean after yourself.
I don't deny that your launcher might have some uses, but I'd definitely stay away from such methods unless I really needed to. It's likely that rewriting the tools that read the registry would be a better option.
OK. But other readers might use it.CG! wrote:Like i wrote: it's one i made and i didn't check for other such programs.m^2 wrote:I didn't look at your tool, but there are others that seem to do the same like this one. You might find some here too.
i want to advance it's features anyway, if enough people are interessted.
Almost anything can be realised, so i'm open for suggestions.
Uhm... no, not really. But the Tool i can think of at the moment, is an Pluginmanager, i used with TC 5.x. Don't have it anymore. But who knows. Maybe there are still some progs out there, that use these entries.m^2 wrote:Could you post an example of such tool? I can't remind any.
What exactly do you mean, with security issue? That i use WSShell?m^2 wrote:OK, you might have slightly better compatibility, but you trade security as you can never assure that you'll be able to clean after yourself.
But you are right with the rollback. Thought about an possibility to rollback if the Starter crashed, but i found no good method.
At the moment it's like this, if it crashes:
No installed TC: 3 useless Registry entries remain,
TC installed: Values set in the reg will be wrong.
in both cases, TC-Start will ask you, if you want to delete them.
So after the rollback, no values will be set anymore.
But in case you got an TC installed, TC-Start will ask you, if you want to start this one instead, so nothing will be altered.
To make this choice easier, it will show the version of both TC's, that's read from the executables.
But again: in case TC-Start crashes, you can even start the installed TC using it, so all entries will always be set.
Others might use what? Sorry for my bad english. (Ya i know, you have already noticed.m^2 wrote:OK. But other readers might use it.

P.s.: i know, that TC offers alot of functions to get him to work, no matter what.
But there are poeple out there, that don't know about it and i don't want to force them to ask, so i'm going to automate stuff.
This way people, that are new to TC, can use it without having an ? above their head.
You can possibly (though unlikely) break the local TC installation and that's the issue. I believe that as long as you write to the registry, you can't avoid this problem.CG! wrote:What exactly do you mean, with security issue? That i use WSShell?m^2 wrote:OK, you might have slightly better compatibility, but you trade security as you can never assure that you'll be able to clean after yourself.
But you are right with the rollback. Thought about an possibility to rollback if the Starter crashed, but i found no good method.
At the moment it's like this, if it crashes:
No installed TC: 3 useless Registry entries remain,
TC installed: Values set in the reg will be wrong.
in both cases, TC-Start will ask you, if you want to delete them.
So after the rollback, no values will be set anymore.
But in case you got an TC installed, TC-Start will ask you, if you want to start this one instead, so nothing will be altered.
To make this choice easier, it will show the version of both TC's, that's read from the executables.
But again: in case TC-Start crashes, you can even start the installed TC using it, so all entries will always be set.
Others might use the information that other tools exist.CG! wrote:Others might use what? Sorry for my bad english. (Ya i know, you have already noticed.m^2 wrote:OK. But other readers might use it.)
Not really. The local TC may only loose it's settings, but won't break.m^2 wrote:You can possibly (though unlikely) break the local TC installation and that's the issue. I believe that as long as you write to the registry, you can't avoid this problem.
Because the only direct editing is done on the mobile TC.
And this iNi edit is not going to be reverted, because it's rewritten everytime.
And you can still launch you local TC using this tool, to get the reg-settings back.
But to be honest: i was concerned about reg edit's too.
But i'm programming stuff using the reg for a whole time now and my reg-edit functions are quit errorfree.
if there's really an error, no editing will be done.
And regarding TC: i could put an backup of these entries on the portable device. But what if it's write protected? Put it on the HD of the PC? it's not what i want? Put them somewhere else in the reg, so TC-Start will recognize it's crash and put them back? Maybe i'll go this way, but i really thought, using TC-Start local would be satisfying enough, to fix an potential crash.
Ya, i know.m^2 wrote:Others might use the information that other tools exist.
Quality before quantity.
if mine sux, then people will use other prog's.
if not, maybe i'll read about it.
it's still version 0.0.1, but all functions has been tested and are fully working. So i still hope to get more feedback, then your's, which is very helpfull atm, but we see things from programers side.
That's what I call breaking. You lend your PC and an hour later you see a totally different file manager... still TC but nothing works the way it was supposed to.CG! wrote:Not really. The local TC may only loose it's settings, but won't breakm^2 wrote:You can possibly (though unlikely) break the local TC installation and that's the issue. I believe that as long as you write to the registry, you can't avoid this problem.
Fortunately with TC it's not very severe because configuration won't be lost, just TC won't be able to find it...also, advanced users will be able to fix it and noobs have less to loose, but it still might be still a big problem for them. Notice that the person with broken TC is likely to be different from the one using TC portable and therefore won't be able to use your tool again.
I think that backup inside the registry is the most robust. Store it on a pendrive - you may break the next machine you'll connect to.CG! wrote:Because the only direct editing is done on the mobile TC.
And this iNi edit is not going to be reverted, because it's rewritten everytime.
And you can still launch you local TC using this tool, to get the reg-settings back.
But to be honest: i was concerned about reg edit's too.
But i'm programming stuff using the reg for a whole time now and my reg-edit functions are quit errorfree.
if there's really an error, no editing will be done.
And regarding TC: i could put an backup of these entries on the portable device. But what if it's write protected? Put it on the HD of the PC? it's not what i want? Put them somewhere else in the reg, so TC-Start will recognize it's crash and put them back? Maybe i'll go this way, but i really thought, using TC-Start local would be satisfying enough, to fix an potential crash.
Store it locally - user is more likely to delete a file than a reg entry.
And I've been thinking about having cleanup code inside TC process in case that sb. kills your launcher by mistake, but that's a minor thing and I'm not sure if it's worth the effort.
Anyway I still think that you shouldn't play with the registry at all. That's unnecessary and insecure.
i think i'll redo some of the code and will switch to your parameter suggestion if registry entries (that point to an existing TotalCmd.EXE) are found.m^2 wrote:That's what I call breaking. You lend your PC and an hour later you see a totally different file manager... still TC but nothing works the way it was supposed to.
Fortunately with TC it's not very severe because configuration won't be lost, just TC won't be able to find it...also, advanced users will be able to fix it and noobs have less to loose, but it still might be still a big problem for them. Notice that the person with broken TC is likely to be different from the one using TC portable and therefore won't be able to use your tool again
if broken reg entries are found, i'll add an Fix-Function, where you can add correct entries for your local installation or let you choose to delete them, if no installation exists.
Maybe i'll write entries for the mobile version then, so there are just useless entries if the prog or the pc crashes.
So, the whole backup thingie will vanish.
Thank for pointing me out on this, because with this method we both and most users should be satisfied.
What kind of cleanup code? What sould it be supposed to do? O_om^2 wrote:And I've been thinking about having cleanup code inside TC process in case that sb. kills your launcher by mistake, but that's a minor thing and I'm not sure if it's worth the effort.
And pointing on my bad english again: what do you mean with sb?
But hey, like mentioned before, i'll go another way, so i don't have to mess with eventually needed backups again.
i really hope that more people have such constructive ideas. ^^
Sounds much better.CG! wrote:i think i'll redo some of the code and will switch to your parameter suggestion if registry entries (that point to an existing TotalCmd.EXE) are found.m^2 wrote:That's what I call breaking. You lend your PC and an hour later you see a totally different file manager... still TC but nothing works the way it was supposed to.
Fortunately with TC it's not very severe because configuration won't be lost, just TC won't be able to find it...also, advanced users will be able to fix it and noobs have less to loose, but it still might be still a big problem for them. Notice that the person with broken TC is likely to be different from the one using TC portable and therefore won't be able to use your tool again
if broken reg entries are found, i'll add an Fix-Function, where you can add correct entries for your local installation or let you choose to delete them, if no installation exists.
Maybe i'll write entries for the mobile version then, so there are just useless entries if the prog or the pc crashes.
So, the whole backup thingie will vanish.
Thank for pointing me out on this, because with this method we both and most users should be satisfied.
sb. = somebodyCG! wrote:What kind of cleanup code? What sould it be supposed to do? O_om^2 wrote:And I've been thinking about having cleanup code inside TC process in case that sb. kills your launcher by mistake, but that's a minor thing and I'm not sure if it's worth the effort.
And pointing on my bad english again: what do you mean with sb?
But hey, like mentioned before, i'll go another way, so i don't have to mess with eventually needed backups again.
Cleanup code is the thing that restores backup. If you're not gonna have it, you don't have to bother.
Well...that's quite old topic, I don't say anything new.CG! wrote:i really hope that more people have such constructive ideas. ^^
Ohh... i'm trying so hard to not use shortcuts, that i already 4got what they mean. Played to much MMO's and got to used to it, that some ppl wasn't able to understand me anymore. X'Dm^2 wrote:sb. = somebody
You meant my restore thingie. O.Om^2 wrote:Cleanup code is the thing that restores backup. If you're not gonna have it, you don't have to bother.
That's what you say. i'm always trying to think about anything that can happen, but no one will ever be able to do so.m^2 wrote:Well...that's quite old topic, I don't say anything new.
So help like yours is more then appreciated.
Because 2 brains can think about more then only one. ^^