Page 1 of 1

Windows portability testing environment

Posted: Mon Jan 12, 2015 9:39 am
by Midas
Warning! Extensive reading required to grasp the solutions expounded here. :mrgreen:

EDIT: I have just realized that, in what is quite an unforgivable lapse, our site's dedicated FAQ entry from where all of it started was never even mentioned once here...
Topics on the subject are plentiful at TPFC forums, so I just wanted to make a little status update and add a possible strategy I haven't seen mentioned yet. Let me start by enumerating some relevant discussions on portability testing, mustered by crisscrossing the forums:
Currently, sandboxing appears to be the preferred method -- most do it via non-freeware Sandboxie, a few through Virtualbox snapshoting.

Still, some others, and me among them (I use Primo), test software via system profiling and by comparing before and after states.

Next up, the topic that provided me with the starting guidelines and tools for an impervious Windows testing environment.
Finally, an updated approach to system virtualization is using Windows installation and booting from virtual disks. Add to this the possibility offered of "differencing VHDs" and theoretically we're all set to get a "bulletproof" and easily resettable testing environment. For now, some more pointers for the concepts and practice of Windows installation to virtual disks:
I have been testing this and I'm impressed by how easy it is to make it work, once you avoid the inevitable pitfalls. Note that, once you have any Vista+ boot manager in place -- and, to the best of my knowledge, this is doable also with Windows 8 and Ten -- this procedure can be used even to boot XP.

IMHO, once you get such a setup, both your (virtual) system and differencing disks will just be (large) files residing on your main hard drive, ready to be easily backed up and replaced whenever needed.

I'll try to add further info later. Feedback welcome. :)

Re: Windows portability testing environment

Posted: Mon Jan 12, 2015 11:43 am
by Specular
Nice collection of resources and links, good to see other solutions such as VMs. From my understanding it seems the main things to check for are:

- Registry changes
- Files created outside the app directory
- .NET dependancies
- DLL dependancies
- Admin rights

And optionally for entries:

- Unicode support

I use Sandboxie + RegFromApp to test the first two, and recently Process Explorer to test for .NET dependancies, but that's as much as I have set up so far. First I launch RegFromApp within a sandbox then from it open an app to test (both contained in the sandbox), and then play around with the app and check the sandbox contents for any files created outside of the main directory.

Re: Windows portability testing environment

Posted: Mon Jan 12, 2015 7:18 pm
by billon
From my poor experience
Running app in Sandboxie, checking RegHive file with Windows Registry Recovery (not stealth) - http://mitec.cz/wrr.html (thanks joby_toss) or RegistryViewer - http://gaijin.at/en/dlregview.php
Stupid tips: GDIPFONTCACHEV1.DAT file created = dotnet app
History, Temporary Internet Files folders = calling home (or just using IE engine for something)

Re: Windows portability testing environment

Posted: Tue Jan 13, 2015 4:15 am
by Midas
EDIT: for the virtual machine snapshot method mentioned above, see the following article:

Stop Testing Software on Your PC: Use Virtual Machine Snapshots Instead
https://www.howtogeek.com/206286/

For a freeware alternative to DeepFreeze, check viewtopic.php?t=21380.

In case you favor the system profiles comparison method, WinPenPack has a very good guide for this at http://www.winpenpack.com/en/page.php?41; note this tutorial mentions RegShot, but I believe it's also applicable to similar utilities like Primo and the like.

And unbeknownst to me, guinness had already posted to TPFC forums the gist of the procedure mentioned in OP for Windows installation (see viewtopic.php?p=48543#p48543).

EDIT2: for a SandBoxie portabilizing tutorial, see viewtopic.php?t=4130...

So, strike two for sandboxing... :)

- - - - -

Might as well add another pointer to a post from our moderator containing relevant definitions:

Specular wrote:From my understanding it seems the main things to check for are:
  • - Registry changes
    - Files created outside the app directory
    - .NET dependancies
    - DLL dependancies
    - Admin rights
And optionally for entries:

- Unicode support

BTW, nice checklist breakdown, Specular.

billon wrote:Stupid tips: GDIPFONTCACHEV1.DAT file created = dotnet app
History, Temporary Internet Files folders = calling home (or just using IE engine for something)

And billon, those tips don't look stupid at all to me, more like easy tells for rapid program containment... keep'em coming. :)

Re: Windows portability testing environment

Posted: Fri Jan 08, 2016 10:10 am
by shnbwmn
A little compilation of the common software used, gleaned from the linked threads in the first post and elsewhere. Note that this doesn't take into account your "testing environment", which is covered more thoroughly in the OP. Feel free to suggest more programs/tips/corrections/etc :)

:arrow: Extraction (if dealing with installers):
  • LessMSI [specific to MSI installers]
  • 7-Zip [for when the above two don't work ...]
... if none of the above works: install, copy program files, uninstall, and continue (you might already spot red flags at this stage).

:arrow: Dependency checking:
:arrow: Registry checking:
* "Analyze" an installation | Check for registry entries/leftovers on uninstallation

:arrow: Process monitoring: [check for running dependencies/registry changes]
:idea: Other programs people use:
  • JauntePE*** [portabiliser ... doesn't work in Win 10?]
  • yaP [portabiliser]
  • Partclone [system image creation and restoring]
** \[user]\Application Data\ ... & ... \Windows\
*** Custom use with batch scripts

:!: Commercial programs:
  • Deepfreeze [systemwide snapshot/sandbox, that resets the OS to a clean configuration on every reboot]
:!: Obsolete software:

Re: Windows portability testing environment

Posted: Fri Jan 08, 2016 11:55 am
by Midas
On account of its relevance to the present topic, I'll just quote this here:
https://www.portablefreeware.com/forums/viewtopic.php?p=78119#p78119 -- JohnTHaller wrote:Testing for portability at PortableApps.com is done via clean installs of Windows 2000 through Windows 10 within virtual machines in VirtualBox. These machines are each updated to the current updates via Windows Update as determined by the default install settings. They are then snapshotted as clean and the portable app is copied in. A registry and file system snapshot is done using RegShot and the like. The app is run, standard functions are accessed including file open/save, options changes, and whatever functionality the app is used for. We then take another registry and file system snapshot and compare it to the earlier one to determine what the app has left behind. The virtual machine is then shut down and returned to a clean state for the next test.
EDIT: our moderator posted portability steps and concerns nicely arranged in a visual map at viewtopic.php?p=82375#p82375 ...

Re: Windows portability testing environment

Posted: Wed Apr 08, 2020 6:28 am
by Midas
:thinking: This looks interesting but as I am not currently on Windows 10 I can't really test it; so, I'll just leave the pointer here:

Applications inside [Windows 10] Sandbox cannot access actual hardware, memory, storage when in Sandbox. In this post, I will share how you can test PS1, EXE, MSI installers in Windows Sandbox.
@ www.thewindowsclub.com /test-ps1-exe-msi-installer-in-windows-sandbox


Plus, quick mention to a program not listed by shnbwmn above:

- Advanced Run (viewtopic.php?t=24826)