How to variablise %appdata% in StubPath key of Active Setup?
Hi, I have the below command needs to be set in the StubPath. It worked fine in DOS, but does not work in StubPath key. I tried to change %appdata% to hardcoded path and it worked. Can anyone please tell me how should I variablise %appdata%? Thanks.
xcopy C:\Atlas\GlobeSoftware %appdata%\GlobeSoftware\ /e /c /y
Answers (4)
cmd /c "xcopy %SystemDrive%\Atlas\GlobeSoftware %AppData%\GlobeSoftware\ /e /c /y"
StubPath value should be like this
cmd /c "xcopy C:\Atlas\GlobeSoftware %AppData%\GlobeSoftware\ /e /c /y"
I have too faced this issue before. Somehow I think Windows/CMD does not resolve the username properly through this. I may be wrong. I have even tried using a Powershell Script and it too does not work. The only thing which works perfectly fine is a VBScript.
Create a VBScript to copy this file and call VBScript in StubPath. I assure you it will work fine.
Take the script from here:
http://msiworld.blogspot.com.au/2012/04/script-to-copy-file.html