Primo (PRogram Installation MOnitor, a Regshot fork)

Submit portable freeware that you find here. It helps if you include information like description, extraction instruction, Unicode support, whether it writes to the registry, and so on.
Message
Author
rhinbc
Posts: 13
Joined: Tue Mar 20, 2018 10:28 am

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#31 Post by rhinbc »

I tried to lock a file with CHKUNIN, and it didn't...
What I did...
1 - Run regshot Shot1.
2 - Add a folder and file to C:
3 - Run regshot Shot2/Compare.
4 - Run CHKUNIN to see changes and leave it running.
5 - Rename the added file.
6 - delete the added file.
7 - delete the added folder.
I did not get any file is locked messages.
How is this happening to you?

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#32 Post by Midas »

Don't have a ready answer so I'll try to document the issue better when it happens next... :?

rhinbc
Posts: 13
Joined: Tue Mar 20, 2018 10:28 am

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#33 Post by rhinbc »

I finally did it... I put the code for my Program Installation Monitor on Sourceforge.
So if any of you want to make it better (like for a 4k monitor) go for it.
I would appreciate it if you let me know if you modify it at bitron@islandnet.com.
You can (hopefully) download it at...
https://sourceforge.net/projects/progra ... p/download

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#34 Post by Midas »

Gotcha! :)

While testing Therapods HWF (viewtopic.php?t=24309), I was informed by ChkUnin it created a settings folder at '%ProgramData%\Theropods' ('%ProgramData%' is Windows 7 equivalent of the former 'C:\Users\All Users\').

After closing HWF, I tried to delete '%ProgramData%\Theropods' and failed every time. Until I closed ChkUnin, that is, which Unlocker (https://www.portablefreeware.com/?id=1658) confirmed was keeping a lock on the folder.

There, mystery solved... 8)

rhinbc
Posts: 13
Joined: Tue Mar 20, 2018 10:28 am

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#35 Post by rhinbc »

Hi Midas...
I'm glad you figured it out... and I have no idea why Chkunin was locking it.
Was it Chkunin, or HWF that created the locked file?
Chkunin should only create the.BAT and .REG files...

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#36 Post by Midas »

That folder, with a sub-folder containing a 'settings.conf' file was created by HWF. That's what makes this situation so puzzling and hard to pinpoint. I guess ChkUnin is locking it when it finds it's one of the filesystem changes it should keep tabs on -- there were in fact 4 simultaneous locks, still according to Unlocker...

Snooper
Posts: 1
Joined: Wed Jan 09, 2019 2:00 pm

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#37 Post by Snooper »

rhinbc wrote: Tue Aug 28, 2018 8:53 am
Spoiler!   
Hi Midas...
I'm glad you figured it out... and I have no idea why Chkunin was locking it.
Was it Chkunin, or HWF that created the locked file?
Chkunin should only create the.BAT and .REG files...
Midas wrote: Tue Aug 28, 2018 2:56 pm
Spoiler!   
That folder, with a sub-folder containing a 'settings.conf' file was created by HWF. That's what makes this situation so puzzling and hard to pinpoint. I guess ChkUnin is locking it when it finds it's one of the filesystem changes it should keep tabs on -- there were in fact 4 simultaneous locks, still according to Unlocker...
BUGS in ChkUnin & PRIMO! Please Help Me!

@rhinbc I've sent an email with almost the same content. So, decide yourself where to reply.

Hi Randy & community!

Before I start. Are you still working on PRIMO project? Or have you, unfortunately, abandoned this mega required tool?

First of all, I want to say you the huge THANK YOU for your effort put in PRIMO. That's a real deal against nasty software leftovers. TBH, your RegShot fork is the best compared to others (e.g. RegShot Unicode 2.0 (from one Russian man who have abandoned it), RegUndo (not a real fork but still...), etc.).

Now, sadly, I should notify you about huge bugs (drawbacks?) that I found in ChkUnin 7.1.0 & PRIMO 3.0.1 (x64 ANSI):

1. ChkUnin can't generate batch command(s) to delete existing files that are listed under [Files added:] section in the valid output TXT (EN) file/log and are NOT located in the newly-created folders that ChkUnin will mark with a RMDIR /S %_nop% delete command in a .bat file.
ChkUnin will successfully generate commands for folders removal but won't for files. It will leave set _nop= and _ok= without any path to file.

Generated batch script looks like that:
Spoiler!   
echo off
color F0
REM The following files still exist...
REM The following DEL commands are in file C:\PRIMO\LOGS\123.bat
REM The files will be DELETED if you execute file C:\PRIMO\LOGS\123.bat
cls
echo.
set _ok=
set /p _ok=Do you really want to DELETE these files? (Y/N) :
if /I NOT "%_ok%" == "Y" EXIT
set _nop=
set _ok=
set /p _ok=Remove prompt to delete folders? (Y/N) :
if /I "%_ok%" == "Y" set _nop=/Q
RMDIR /S %_nop% "C:\Program Files\COMODO"
RMDIR /S %_nop% "C:\Program Files (x86)\Comodo"
...
pause
As you can see, there are no files paths in batch script. Files that were created between two PRIMO 3.0.1 (RegShot) snapshots are still located in "C:\Test Folder\" and aren't in any of COMODO directories.

Note: "C:\Test Folder\" wasn't created after the second snapshot. You can see this in the PRIMO output file (I've removed millions of noise data for better understanding):
Spoiler!   
===================START===================
Randys Regshot 3.0.1 x64 ANSI (Based on Regshot 1.9.1)
Comments: 123
Datetime: 2019-01-02 20:30:51, 2019-01-02 20:35:04
Computer: WORKSTATION-#51-NSA.Sub2
Username: Agent Brian W. Foster
--------------------------------
Folders added: 311
----------------------------------
C:\Program Files\COMODO
C:\Program Files\COMODO\COMODO Internet Security
...
C:\Program Files (x86)\Comodo
C:\Program Files (x86)\Comodo\COMODO Secure Shopping
...
C:\ProgramData\COMODO
----------------------------------
Files added: 4936
----------------------------------
C:\Test Folder\New Text Document.txt
2019-01-02 20:32:56, 23
C:\Test Folder\Test File.rtf
2019-01-02 20:32:59, 56
===================END===================
2. Generally, there are no major issues with folders or registry keys/values processing. ChkUnin & PRIMO shine here, almost. Maybe not a bug but still dangerous...
ChkUnin with PRIMO along can't handle keys/values, folders/files renaming. PRIMO treats renaming as deleted/created and ChkUnin use PRIMO's output data to generate registry and file system clean up files (.reg, _mods.reg, .bat) that can brick the OS by deleting renamed folder instead of renaming it back.
For example: if any program will rename any key/value, folder or file that is necessary for the OS (I mean, it must at least exist, "no" matter what the name is), PRIMO will say that it/they was/were deleted & created like a new entries with a new name. Then, ChkUnin will generate "OS dealthful" .reg & .bat files. Well, that will be a mess, TBH.
I assume it's not a bug, it is more like a not filled gap in functionality that can cause a lot of issues.

3. As you may already know, ChkUnin also blocks files/folders until closed. I did a lot of investigations and can say that it does something weird with attributes/permissions, do not know why and how.

4. No Unicode support. Not a bug, more a missed feature. I saw a lot of feedback on RegShot SourceForge's official page and other forums from people who complain about RegShot 1.9.1 x64 Unicode doesn't work on Windows 10, but it works for me on Win 10 Enterprise LTSC 1809 (x64). I tried to take snapshots with the original RS 1.9.1, with different settings (reg, dirs, both, etc.) in different OS modes (safe/normal) and it works. With "Not Responding" message for 1-2 min but works! :)
So, would you consider rebuilding PRIMO/ChkUnin to fully support Unicode?

5. Minor bug. PRIMO (RegShot) wrongly increases information about [Total changed size:] in an output file every single time you click "Output". To know the exact size changes user should use Calc_size.vbs like a workaround.

That's all for bugs/drawbacks. But I also want to give you the recommendations to improve PRIMO. Here are my findings:
1. Reorganize the UI layout to be more compact and clear. Divide check boxes on different groups. I can make a graphical prototype later.
2. Add an option to scan only wanted registry hive keys, like it's already implemented with directories scan but with check boxes.
3. Add an option to NOT quit from RegShot after pressing any key to interrupt current scanning process. Just to pause/stop, not quit, because it's possible to lose 1st not saved snapshot while taking and breaking the 2nd one.
4. Will be soon...

Well. Are there any workarounds/future fixing plans to solve issues listed above?

Nevertheless, thank you, Randy, for a great utility! Take care and keep up the great project!

Regards,
Brian Foster


P.S.
I've read whole PRIMO documentation and have checked almost every single file (along with code) from Primo.zip (downloaded from SourceForge.net). Haven't found any code gaps where it is possible to prevent ChkUnin from missing files deletion. Maybe I've missed something, let me know.

I use PRIMO on Win 10 Enterprise LTSC 1809 (x64).
My main Regshot.INI settings are:
Spoiler!   
[Setup]
Flag=3
Flag2=0
Flag3=0
Flag4=0
Flag5=1
Flag6=0
Flag7=0
ExtDir=C:\;
OutDir=C:\PRIMO\LOGS
UseLongRegHead=1
Maxdata=0
Language=English
Suffix=.txt
[SkipRegKey]
[SkipDir]
0=$RECYCLE.BIN
P.S.2
Sorry for all the made typos and formatting issues.

Regards again. :)

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#38 Post by Midas »

Primo v3.20 released, dated 2019-03-29 (no online changelog, see below).

Code: Select all

----------------------------------------------
Version 3.2.0 of Regshot 1.9.1, March 28, 2019
----------------------------------------------

Again, thanks to Brian for this information on why HKEY_CURRENT_USER is better than
HKCU in a .REG file...

The reason for this is that Windows doesn't allow you to use HKCU instead of full head
in .reg files, otherwise, it will simply ignore all the lines with HKCU and won't make
changes to HKEY_CURRENT_USER registry master key just because of using short head. 
You can use HKCU (-LM, -CR, etc.) to navigate through the registry and it will work
there, but if you want to modify the registry from .reg files it's necessary to use
long head instead. 

So I have made changes to Regshot 3.1.0 and upgraded it to 3.2.0

1 - I added an option to change HKEY_USER\SID to HKEY_CURRENT_USER.

2 - I upgraded the GUI, and I think it is cleaner and looks better.

3 - I have changed the way the "Set defaults" works.
    It is now a button, not a check box, and uses a message box
    to set the Shot1, Shot2, and Compare defaults.
    I think this is better than the old way, but is still not
    a window. Hopefully I may figure out how to create a window
    in a window that brings up an option panel one of these days
    when I feel particularly energetic.

-------------------------------------------------
My version 3.1.0 of Regshot 1.9.1, March 03, 2019
-------------------------------------------------

Several minor changes... 

1 - If you do Compare/Output more than once, the totals no longer increase.
    Thanks to Brian Foster for pointing out.
    
2 - To cancel a regshot run, the only keys that work now are ESC and "q".
    Note.. it may take several seconds as Regshot is CPU intensive.

3 - The "Default Compare extension" will always be added to the "Compare filename",
    even if there is a period in the name.

4 - You can use 00-99 in [SkipRegKey] and [SkipFileKey] so all numbers are the same
    length.

5 - The date Regshot was compiled is now added to the "About" info.

6 - [SkipRegKey] and {SkipFileKey] are NOT case sensitive.
    In my attempts to fix bugs, I found the following:
    The stricmp function compares two null-terminated strings, ignoring case. 
    All uppercase characters are mapped to lowercase characters for comparison. See
    www.globalyzer.com/gzserver/help/reference/localeSensitiveMethods/stricmp.html

7 - I added error checking code to trap errors while reading/writing the .INI file.
    Hopefully you will never see this.

NOTE... on my Win 10 Pro at 1809, regshot takes over 5.5 minutes to process the
        registry with no [SkipRegKey] entries.
        This appears to be caused by something in HKLM\SOFTWARE. If I skip that, 
        it takes about 15 seconds, but you lose all software updates!
        If you skip PerfLib ..eg.. 0=PerfLib... it takes about 45 seconds.

If you have a hi-res monitor, several users have found that the Regshot window
is truncated on the right side and bottom.

There are 2 ways around this...

1 - change your resolution to 1024x768, which probably negates the benefits of
    a hi-res monitor, or,

2 - Create a shortcut for Regshot and set the Properties "Run" option to maximized.

And there may be a 3rd way...

Under right-click/Properties/Compatibility there is a "Change high DPI settings" 
option that may fix this. If you have a hi-res monitor, give it a try.
Download from http://members.tripod.com/~randy_hall/download.htm.

FYI, source is at sourceforge.net/projects/program-installation-monitor/.

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#39 Post by Midas »

Alas, Primo's ChkUnin is still locking files and folders after running it's report -- at least until it is terminated... :(

Image

rhinbc
Posts: 13
Joined: Tue Mar 20, 2018 10:28 am

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#40 Post by rhinbc »

Hi Midas...
You must be special, as I can't get chkunin to lock files!

I took snapshot one, added a new folder to C:\ProgramData and a new file in that folder,
and then copied it to C:\Users\Randy.
Interestingly, I found out that C:\Users\All Users IS C:\ProgramData, which I didn't know,
as snapshot two showed the new folder in both!
And if you go to C:\Users\All Users with File Explorer, you end up in C:\ProgramData.

So... the chkunin output is:
set _ok=
set /p _ok=Do you really want to DELETE these files? (Y/N) :
if /I NOT "%_ok%" == "Y" EXIT
set _nop=
set _ok=
set /p _ok=Remove prompt to delete folders? (Y/N) :
if /I "%_ok%" == "Y" set _nop=/Q
RMDIR /S %_nop% "C:\ProgramData\test"
RMDIR /S %_nop% "C:\Users\All Users\test"
RMDIR /S %_nop% "C:\Users\Randy\test"
pause

I left chkunin running and was able to rename "C:\ProgramData\test", so there was no lock on it.
And LockHunter also said there was nothing locking the file.
(It seems it only looks for file locks, not folder locks)

Chkunin is C++ and uses GetFileAttributesA to see if a folder or file exists,
and as near as I find out, it doesn't lock either.

So I installed Unlocker and tried it..
It said no locks were on my test folder/file with chkunin running.

So unfortunately I am as a loss as to why you are seeing chkunin.exe locking files.
If I do find out why it is happening, I will post it here and update the program.

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#41 Post by Midas »

rhinbc wrote: So unfortunately I am as a loss as to why you are seeing chkunin.exe locking files.
If I do find out why it is happening, I will post it here and update the program.
Same here. And so sorry for the trouble. :(

I only checked Unlocker after I was unable to delete folders in '%APPDATA%' and '%LOCALAPPDATA%' while ChkUnin was running -- I need to keep the info it gathers at hand while posting about tested software. I'll examine my setup more closely and report any findings...

Primo is still my number one tool for checking portability/system traces, it is fast, reliable and user configurable.

rhinbc
Posts: 13
Joined: Tue Mar 20, 2018 10:28 am

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#42 Post by rhinbc »

Hi Midas...
I've looked at Chkunin and can't see why it locks your files...
I will be surprised if it works, but I have added a Flushall at the end of the code to see if that helps.
Download it at http://www.islandnet.com/~bitron/chkunin-x64-ANSI.zip and see if it helps.
And thanks for using Primo. I'm glad it (almost!) does what you want.

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#43 Post by Midas »

Tried the new executable once... no go, had to revert back. :(

Image

rhinbc
Posts: 13
Joined: Tue Mar 20, 2018 10:28 am

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#44 Post by rhinbc »

Bummer... (and worse expletives!)
It looks like you cannot flush folders like C:\Program Files (x86)\…
Oh well... back to the drawing board...
A way around this may be to end chkunin and then edit the .bat and .reg files it created..
That's what I usually do.

User avatar
Midas
Posts: 6710
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: Primo (PRogram Installation MOnitor, a Regshot fork)

#45 Post by Midas »

It's no biggie, just slightly annoying that, while manually cleaning after a write-up by deleting stuff and closing a couple of the scores of folders and apps I have running at any given time, I have to remember to close ChkUnin first or otherwise it's a no go... :|

Post Reply