Windows portability testing environment

Share interesting information or links related to portable apps here.
Post Reply
Message
Author
User avatar
Midas
Posts: 5344
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Windows portability testing environment

#1 Post by Midas » Mon Jan 12, 2015 9:39 am

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. :)
Last edited by Midas on Sat Feb 13, 2016 4:53 am, edited 3 times in total.

Specular
Posts: 418
Joined: Sun Feb 16, 2014 10:54 pm

Re: Windows portability testing environment

#2 Post by Specular » Mon Jan 12, 2015 11:43 am

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.

billon
Posts: 757
Joined: Sat Jun 23, 2012 4:28 pm

Re: Windows portability testing environment

#3 Post by billon » Mon Jan 12, 2015 7:18 pm

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)

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

Re: Windows portability testing environment

#4 Post by Midas » Tue Jan 13, 2015 4:15 am

EDIT: for the virtual machine snapshot method mentioned above, see the following article:

Stop Testing Software on Your PC: Use Virtual Machine Snapshots Instead

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. :)

shnbwmn
Posts: 265
Joined: Sat Jul 11, 2015 12:59 am

Re: Windows portability testing environment

#5 Post by shnbwmn » Fri Jan 08, 2016 10:10 am

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:
Last edited by shnbwmn on Sat Jan 09, 2016 12:23 pm, edited 11 times in total.

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

Re: Windows portability testing environment

#6 Post by Midas » Fri Jan 08, 2016 11:55 am

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 ...

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

Re: Windows portability testing environment

#7 Post by Midas » Wed Apr 08, 2020 6:28 am

: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.


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

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

Post Reply