Elad Posted November 6, 2017 Report post Posted November 6, 2017 Hello! I want to run the following command after OneDrive application deployment: %LocalAppData%\Microsoft\OneDrive\OneDrive.exe /configure_business Appreciate any assistance! Elad. Quote Share this post Link to post Share on other sites More sharing options...
dinci5 Posted November 6, 2017 Report post Posted November 6, 2017 Ho do you deploy the application? Did you wrap it in a script? VBS, bat, PS? If so, you can easily append that command in the script. Quote Share this post Link to post Share on other sites More sharing options...
Ath3na Posted November 6, 2017 Report post Posted November 6, 2017 Hi, If you want the application to be configured for each new user that logs onto the machine and you only want it to occur once per user than Microsoft have something built for this already. It's called activesetup. You just add a few registry keys to HKLM. User logs on and it runs whatever is in the stubpath info Example If you run the below code in the ISE as administrator, then log off and back on again IE will load just one time per new user For each new activesetup make sure you make it unique with a new GUID #requires -Version 1 <# Author: Richard Knight Version:1.0 Purpose: Creates Active Setup keys random GUID created at https://www.guidgenerator.com/ #> $Appname = 'Name of Application' $stubpath = 'C:\Program Files (x86)\Internet Explorer\iexplore.exe' $Reglocation = 'HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{f4d8fb9e-3bce-4152-add4-2f4e5f647610}' New-Item -Path $Reglocation -Force New-ItemProperty $Reglocation -Name 'Product' -Value "$Appname" New-ItemProperty $Reglocation -Name 'StubPath' -Value "$stubpath" New-ItemProperty $Reglocation -Name 'Version' -Value '1' Quote Share this post Link to post Share on other sites More sharing options...
Ath3na Posted November 6, 2017 Report post Posted November 6, 2017 Here is the .reg if it makes it easier. Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{f4d8fb9e-3bce-4152-add4-2f4e5f647610}] "Product"="Name of Application" "StubPath"="C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe" "Version"="1" Quote Share this post Link to post Share on other sites More sharing options...
Elad Posted November 6, 2017 Report post Posted November 6, 2017 1 hour ago, dinci5 said: Ho do you deploy the application? Did you wrap it in a script? VBS, bat, PS? If so, you can easily append that command in the script. Hi dinci5, Sorry i wasn't clear, I'm deploying the Application via SCCM Application option. Thanks! Quote Share this post Link to post Share on other sites More sharing options...
Elad Posted November 6, 2017 Report post Posted November 6, 2017 2 hours ago, Ath3na said: Here is the .reg if it makes it easier. Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\{f4d8fb9e-3bce-4152-add4-2f4e5f647610}] "Product"="Name of Application" "StubPath"="C:\\Program Files (x86)\\Internet Explorer\\iexplore.exe" "Version"="1" 2 hours ago, Ath3na said: Hi, If you want the application to be configured for each new user that logs onto the machine and you only want it to occur once per user than Microsoft have something built for this already. It's called activesetup. You just add a few registry keys to HKLM. User logs on and it runs whatever is in the stubpath info Example If you run the below code in the ISE as administrator, then log off and back on again IE will load just one time per new user For each new activesetup make sure you make it unique with a new GUID #requires -Version 1 <# Author: Richard Knight Version:1.0 Purpose: Creates Active Setup keys random GUID created at https://www.guidgenerator.com/ #> $Appname = 'Name of Application' $stubpath = 'C:\Program Files (x86)\Internet Explorer\iexplore.exe' $Reglocation = 'HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{f4d8fb9e-3bce-4152-add4-2f4e5f647610}' New-Item -Path $Reglocation -Force New-ItemProperty $Reglocation -Name 'Product' -Value "$Appname" New-ItemProperty $Reglocation -Name 'StubPath' -Value "$stubpath" New-ItemProperty $Reglocation -Name 'Version' -Value '1' Thanks! My question is how do i add such script so it will run after SCCM has successfully installed the Application to a given machine. Thanks again. Quote Share this post Link to post Share on other sites More sharing options...
BryanP Posted November 6, 2017 Report post Posted November 6, 2017 As someone else already mentioned, if you're running a script to perform the installation, just append it to the end of your script. If you were deploying it as an SCCM Package (instead of an Application), then you could create two packages. Have Package A install OneNote. Have Package B run your command. Then use the Run another program first option on Package B, tell it that it has to install Package A, then deploy Package B. I'm sure there's an equivalent to that with Applications, but in all honesty I still do far more with packages than applications. Quote Share this post Link to post Share on other sites More sharing options...
Elad Posted November 7, 2017 Report post Posted November 7, 2017 14 hours ago, BryanP said: As someone else already mentioned, if you're running a script to perform the installation, just append it to the end of your script. If you were deploying it as an SCCM Package (instead of an Application), then you could create two packages. Have Package A install OneNote. Have Package B run your command. Then use the Run another program first option on Package B, tell it that it has to install Package A, then deploy Package B. I'm sure there's an equivalent to that with Applications, but in all honesty I still do far more with packages than applications. Thank you! Quote Share this post Link to post Share on other sites More sharing options...