Need Active Setup to run on every logon
I have an Active Setup which adds files/folder structure to the user’s (%appdata%) Roaming profile post install of software and reboot of machine. In researching Active Setup, I learned that it runs a single time for each user. My need is for this to be run each time a user logs into Windows. There are a couple of reasons for this need. An example is if someone were to mistakenly delete a file from their Roaming profile that was generated from the Active Setup. In this scenario, rebooting/logging back into Windows will not kick off the Active Setup because it had already run once previously on the original install. Another and more pressing reason is that the folder structure and files that get created on first logon post install&reboot are not getting created a second time after uninstalling from the first install – as follows:
Virgin machine Install – reboot – login – folder structure/files created – uninstall – reinstall – reboot – login = Folder structure/Files not created
I think that the Active Setup from the first install left a thumbprint in the registry indicating the that it has already been run.
Is there a way for any file to be checked for its existence and be added if missing? I suspect a reg key and Custom Action have to be added to accommodate..? Since hard coded paths do not work for Roaming profiles, any script and reg key would have to use environment variable (%appdata%) so that it would apply to whomever is logged in at the time.
My question is, is there a way to get an Active Setup to run every time a user logs in?
If instead a Custom Action with script has to be used, please include the script itself (and what settings should be set in the Common tab of the Custom Action).
Been banging my head on this for too long..! Please, any help is greatly appreciated!