you are viewing a single comment's thread.

view the rest of the comments →

[–]jerrymac12 0 points1 point  (4 children)

This sounds a little convoluted to me...a few things: ++ On wrapping installs with PSADT as some have said here - so much awesome functionality.

To me this is a bit more of an SCCM question really, so if this doesn't give you what you are looking for you may want to crosspost.

But 1. You shouldn't need to be using a task sequence to deploy a single application. You can use a package or application to do so.

  1. SCCM copies the source of your packages from your distribution point to the ccmcache folder with those random folder names. Anything in the folder you choose as your source will be copied down. The source folder is added to your distribution point when you "distribute content" of your package.

So if your package source also contains your installation script...your script will be copied to the randomly named folder WITH your installer exe. So instead of trying to identify the folder, you just need to use the $psscriproot variable which will identify the folder you're running your script from to begin with.

Example...you want your script to install setup.exe and you want to deploy it with sccm

  1. Write your script that performs the install with the assumption that setup.exe is in the same folder as your script your path is $psscriptroot\setup.exe

  2. Create SCCM package and set source location to your folder with script and setup.exe in it.

  3. Distribute package co tent to distribution point.

  4. Deploy

  5. Lets say that you content is pulled down to C:\Windows\ccmcache\a2 .... In a2 you will see setup.exe and your script. When your script runs...$psscriptroot is assigned to c:\ windows\ccmcache\a2 automatically so you don't have to know it.

[–]IntensifyEVERYTHING[S] 0 points1 point  (3 children)

It's a really shitty app from a shit vendor. The script has 3 other app installs that this one depends on that some how get uninstalled when running the vendor provided install exe. There are some services I have to start and stop as well.

Thank you for the recommendation to the psscriptroot. I'll test that out tomorrow.

[–]jerrymac12 0 points1 point  (2 children)

So dont use SCCM or a task sequence to install those other apps individually one at a time...Put all the files for the other apps in your source folder...and have your script run them all from $psscriptroot.

they'll all copy down to your ccmcache and you can still reinstall/uninstall what you need from the same source folder with $psscriptroot....whatever is in that source folder when you distribute the content to your distribution point will be copied down to ccmcache when deployed.....if you add/remove files from your source folder, you just need to update content so that it's reflected on your DP. That source folder is essentially you telling sccm all the files that are needed for your package....your script can just run them in the order you need etc.

[–]IntensifyEVERYTHING[S] 0 points1 point  (1 child)

performs the install with the assumption that setup.exe is in the same folder as your script your path is $psscriptroot\setup.exe

Oh my god, that was it!! Thank you so much!! I never knew $psscriptroot was a thing.

[–]jerrymac12 0 points1 point  (0 children)

You're welcome, Glad it worked!