Hello All,

I have created an active setup key:


[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Active Setup\Installed Components\APPNAME]
"StubPath"="C:\\path to\\batchfile.bat"
Problem is, it's not working. This never kicks the batch file. I launched the batch file manually and it works fine. I have even changed the location to:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\APPNAME]

but no luck. Any thoughts? Anybody?

Thanks
AK
Answer Summary:
Thanks for you feedback. Issue was the folder which was not in place for active setup to actually copy files into. So I had to modify the active setup to first create the folder and then copy the file to it. Once again thanks.
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

4
There are 2 things that are needed in the HKLM keys: stub path and version. Also jmaclaurin makes an excellent point: check your hkcu and make sure it hasn't already run or irrespective of what you do, if your hkcu version matches or exceeds the hlkm version #, it won't run.
Answered 03/22/2012 by: Arminius
Second Degree Green Belt

Please log in to comment

Answers

2
try StubPath without quotes

StubPath="C:\\path to\\batchfile.bat"
Answered 03/22/2012 by: kardock
Second Degree Green Belt

  • No luck there either.
Please log in to comment
1
Hello All,

Thank you so much for all the feedback on this, the issue has been resolved. I came to find out that, the folder that the active setup was creating file in was not in place. So I had to modify the active setup so it creates that folder and then place the file in there.

Thanks a bunch.

AK
Answered 03/26/2012 by: 786_ak
Second Degree Green Belt

Please log in to comment
1
This works for me.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\[ProductCode]]
@="[ProductName] [ProductVersion] changes for the current user"
"Locale"="*"
"StubPath"="pathtoexecutable"
"Version"="1"
Answered 03/22/2012 by: jmaclaurin
Third Degree Blue Belt

  • I create this as a reg file and import it into the MSI/MST.

    Also, check in HKCU and be sure that it already hasn't run.
  • could be the double \. my activesetup do not have any double \
Please log in to comment
1
All in place, but not working......
Answered 03/22/2012 by: 786_ak
Second Degree Green Belt

  • It could be how its set up to lay down. Is the active setup set to run before your MSI,or after? It might just be bad placement for active setup. I know it sucks to do this but have you tried to remove the whole active setup from the install and redo the whole process it could be something was missed. Just a thought.
Please log in to comment
1
Hello All,

Thanks for you feedback. Issue was the folder which was not in place for active setup to actually copy files into. So I had to modify the active setup to first create the folder and then copy the file to it. Once again thanks.

AK
Answered 03/27/2012 by: 786_ak
Second Degree Green Belt

Please log in to comment
1
Just as a test, copy the following to a file ‘test.reg’ & import it:



Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Active Setup\Installed Components\Notepad]
"StubPath"="C:\\Windows\\SysWOW64\\notepad.exe"
"Version"="1.0.0"



When you log in again, Notepad should run. This will show if Active Setup is working properly on your machine.
Answered 03/23/2012 by: andys0123
Orange Belt

  • Just a minor point and I am not for one minute suggesting this will fix the issue, but you should be using commas rather than periods as delimeters in the version number
Please log in to comment
1
check if it has already run on that machine. If it is run once, it will not run again. Either change version number or appname/productcode.
Answered 03/23/2012 by: piyushnasa
Red Belt

Please log in to comment
This content is currently hidden from public view.
Reason: Removed by member request
For more information, visit our FAQ's.

Answer this question or Comment on this question for clarity