Can SCCM 2012 launch a program during installation? (WinSQL 5.5)
The install will be running in the system context, and therefore won't be able to perform the other actions in the batch file that you want to run in the user context.
Assuming you have a site licence, and every user of the target machine will have access to it then there are a few ways to approach this. All of these would remove the need to launch the application first as you'd create the folder structure as part of the process.
The 'pure' MSI packaging approach would be to use an customisation file with the MSI (MST) to include the file with the package (either in the INIFILE table or as a flat file) and use ActiveSetup to populate this for all users.
Running the MSI from a batch file means that you lose some of the functionality of SCCM with regard to the handling of MSI files.
Other methods to consider are:
-Per-User SCCM package to populate the file
-Login script that uses 'if not exist' then copy to populate the file
-Script utilised by ActiveSetup to populate the file.
Hope that gives you a few pointers,
This provides a good direction to where I ultimately will end up. Something tells me I will just create the MST for this particular setup.
Thank you! - DaBXRoMeO 6 years ago
The methods I've tried have not worked via SCCM.
Below is my current batch script just for the Folder and file creation. I've tried this a few different ways but keep falling short. I tried to change the current working directory via
...but that didn't work. I also tried the MST method, and that did not work. At this point I think I'm burning myself out.
(Current batch file)
copy "WinSQL.conf" %userprofile%\AppData\Roaming\WinSQL\ - DaBXRoMeO 6 years ago
This batch would need to be run in the user context, and run for each user logging on that needs to use the application - and only when a user is logged on.
Have you verified that manually creating the directory structure and dropping in the file achieves the desired result when running the MSI from SCCM? - dunnpy 6 years ago
Yes, manually creating the directory structure and copying the .Config before running the .MSI works. It actually adds files to the folder and amends the .Config keeping the information I need after you launch the program for the first time.
It's just creating the directory structure and copying the file through SCCM that's causing the issue. I tried changing the working directory, but it just doesn't do what I need it to. - DaBXRoMeO 6 years ago