Guest Keatah Posted November 4, 2012 Share Posted November 4, 2012 I think this could be useful for working with older programs. Programs that store the last 4 files used, in an ini file. I've got an old paint program, which I still use today, paintshop pro 3.12. Yep, this is from the early 1990's! Well, this particular program saves all its settings in an ini file. That's fine. It also saves the last 4 files accessed in that same ini file. That's not fine. I would like CCleaner to be able to execute Batch Files, This is a simple call to batch file. Nothing more. In thinking about PaintShop Pro, you see, I could have a batch file overwrite the configuration file with a fresh config file that doesn't have the last 4 names accessed. CCleaner's responsibility here would be nothing more than calling myfile.bat. Does anyone see this being useful? Link to comment Share on other sites More sharing options...
Winapp2.ini Posted November 4, 2012 Share Posted November 4, 2012 They were talking a while back about being able to modify inis natively with ccleaner, but unfortunely it never seemed to happen. Alan_B can help you do what you want with batch scripts, however. winapp2.ini additions thread winapp2.ini github Link to comment Share on other sites More sharing options...
Super Fast Posted November 4, 2012 Share Posted November 4, 2012 What you are wanting, is to retain the settings to the program, just not the history. This takes a bit of learning/trial & error if you are not used to it, but it can be accomplished with WinRar SFX creation. Batch Icon Extractor will give you perfect icons to use for the SFX loader when you archive the files & turn it into SFX. Advantages of SFX packages: -> Extracts to temp, then auto cleans up when you close the program. -> When you run SFX from flash drives, files are written to the PC (faster writes than flash disk) & run from there. (Also saves write cycles to your flash). -> Programs packed as SFX always stay the same. Run them 1 or 1 million times, the settings are always the same. No history ini files are retained after you close. -> SFX reduces size sometimes by 1/2 to 1/4 the original, when using max compression + solid. -> Files stored in SFX make it easier, because you no longer have to have a folder with 30 files in it. You have a single SFX that extracts to temp & runs. I am not sure if this is what you are seeking, but I use similar for personal things I create from time to time. Link to comment Share on other sites More sharing options...
Alan_B Posted November 4, 2012 Share Posted November 4, 2012 You could place in the same folder as CCleaner64.exe (or CCleaner.exe) your special BAT script. The script could either BEGIN with your special actions and conclude with START CCLEANER64 EXIT which will close the "DOS Window" and put CCleaner into action Or alternatively begin with START "Ccleaner then my-special" /WAIT CCLEANER64 REM followed by your code Which puts in the DOS Window Title Bar "whatever text you like" whilst doing your stuff, and only after CCleaner has done its job will your special code take action. Link to comment Share on other sites More sharing options...
Guest Keatah Posted November 4, 2012 Share Posted November 4, 2012 @SF Interesting way of doing things. So you're saying to create an SFX and then use BatchIconExtractor to dig inside and create an icon to the executable I want to run? Link to comment Share on other sites More sharing options...
Super Fast Posted November 4, 2012 Share Posted November 4, 2012 No. Drag & drop your program onto BatchIconExtractor & it will create a folder called icon with all your icons. Next, create an SFX within WinRar & one of the options is to use an icon. So, browse to SFX icon to use, & select what you have extracted. Link to comment Share on other sites More sharing options...
Guest Keatah Posted November 4, 2012 Share Posted November 4, 2012 I got the BatchIconExtractor part down and got a handful of icons. ok I made the SFX with WinRar, and assigned an icon. ok But how do I get the SFX file, when I click on it, to execute one of the executables within it. For example, the program I'm working with is an executable within C:\Program Files\PSP And the executable's name is, creatively, PSP.EXE So after building an SFX archive of the PSP directory, which comes to 1.5MB, how do I run PSP.EXE? Link to comment Share on other sites More sharing options...
Guest Keatah Posted November 4, 2012 Share Posted November 4, 2012 Ahh never mind. I found the answer. Link to comment Share on other sites More sharing options...
Super Fast Posted November 4, 2012 Share Posted November 4, 2012 SFX advance options, type exampleprogram.exe Better to create the sfx from a group of files, instead of using a folder, else youll have to examplefolder/exampleprogram.exe Some programs do not work well with inputting a folder name, so better to just add the files directly, as Rar will auto generate SFX001, SFX002 etc. as folder names on extract. * Also, for most purposes, want it to auto extract to temp folder. On title ?, I do similar: -> 32 Bit / Example Program / 11.3 Then, "Run Example Program?" Or if making an installer, "Install Example Program?" Rar can also run multiple files, & it will wait till the 1st one exits before lauching 2, 3, 4, etc. Silent SFX work great also. Link to comment Share on other sites More sharing options...
Guest Keatah Posted November 5, 2012 Share Posted November 5, 2012 Mmm. I kind of tried out both solutions presented here. I think I might stay with the batch file style of doing things. It keeps the Kolmogorov Complexity factor low. I don't see a need to read an entire archive file, unpack it, write it and then read it again to use it. That's far too much work. I believe the better solution is to write a batch file that either edits the preferences.ini file or replaces the file entirely from "protected store". Similar in concept to how the DLLcache and SFC in windows operates. This also allows me to keep settings between program uses if I need to when working on a project spanning several days. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now