Custom Script for Installing Adobe Acrobat DC - batch-file

I do not think this question has been clearly asked before here on this site. I have scoured Google in hopes of finding a solution, but the information is scattered around the web and difficult to piece together in a timely fashion (with my limited scripting knowledge anyway). So, any help would be appreciated, and if there are any questions about what I'm trying to accomplish here, feel free to ask. I am reaching out because when it comes to creating scripts that are more complicated than merely launching an executable, my knowledge is very limited.
What I am trying to do:
Ultimately, I will be using ManageEngine Desktop Central to push a configuration out to remote computers on our domain/network. The more simple goal, that I just can't seem to find success with, is getting a batch file that can be as easy as running it and successfully installing Adobe Acrobat DC (Not the free Adobe Reader application). I would like to have a batch file that checks to see if the install folder is there, and if it is, uninstall it to eliminate the message that is prompted stating "Error 1316. The specified account already exists." or any other traces of Acrobat that would cause this install error. Once the safeguards are in place to avoid install errors, such as the error previously mentioned, it gets more simple. After that, I just want Adobe Acrobat to install, then I want to remove the shortcut "Adobe Creative Cloud.lnk" from all the users' desktops so they only see the "Adobe Acrobat DC" shortcut.
UPDATE**
Okay, in the time I posted the original post, I have tried throwing together a batch file, but it still will not work. I am using a 3rd party service to deploy this config, so contacting Adobe would not be helpful. I don't expect most people to be familiar with ManageEngine Desktop Central, but that is why I need a batch file, which Adobe support cannot help me with. what I have right now is:
IF EXIST "C:\Program Files (x86)\Adobe\Acrobat DC" (
rmdir "C:\Program Files (x86)\Adobe\Acrobat DC"
goto :install
) ELSE (
ECHO Acrobat Folder Doesn't Exist goto :install
)
:install
S:\Adobe_CC\AcrobatPro\AcrobatDC\AdobeAcrobatDC\Build\setup.exe --silent
IF /I "%ERRORLEVEL%" NEQ "0" (
ECHO execution failed
)

The answer here is a bit different, due to the fact most of the work is done in ManageEngine Desktop Central. What fixed the issue, in my case, was downloading the Creative Cloud Packager (CCPLauncher.exe) and advancing through the wizard. I disabled the end user being able to install updates or install other products. The only switches left on were the ones to allow my IT department to remotely manage and push out updates. I then ran through with defaults and selected only Adobe Acrobat DC [Pro] (the Adobe Creative Cloud Application Manager will be grayed out and cannot be unselected).
After the package was created and placed in my network share that contains all of my software executables, I opened and logged into Desktop Central. The first step was to create the Package in DTC. You do this by clicking Software Deployment tab, then click "+ Add Package" and select your operating system. Once you've done that, click "Create Package manually." After that, select the radio that fits the file type you are working with, in my case, I selected "MSIEXEC/EXE/ISS/Command." Then name your package and select the current license type (I selected Commerical). After that, in the field labeled "MSI File Name with Network path*:", enter the path of the executable/MSI file including the file and extension. Under Installation Enter the same path, if the same path applies here, which in most cases it will, but leave the file name and extension off. This is just for the folder where the installer resides. Then click the Add Package button below. At the top, I then clicked Configurations then on the left pane, Configuration. I chose to "Install/Uninstall Software" and selected Computer. I ran through the usual and named the configuration, then selected the "EXE" radio button and find the "Package" you just made and be sure the drop down list below that is set to Install Completely (or another option depending what your file is). For "Apply Deployment Policy:" select the correct one; I selected DC Default Policy. Below that, select the User/Computers you want to apply this configuration to on your network and click "Deploy" or "Deploy Immediately" and you are done. I made a Security Group in Active Directory and added machines to that and then in DTC, chose to deploy it to the Group that I named "Adobe Acrobat DC Pro" in AD. My configuration deployed successfully and I was able to recreate that successful deployment on every new computer I added to the group in AD. Hopefully there is someone out there that ran into the same problem with Desktop Central that now has somewhat of an answer. If this method does not work for you, hopefully you can find success with your issue.

Related

Trying to write a batch file to handle vanilla builds for me, installing generic apps(google, zoom, outlook, etc), but want it to handle more

I have a vanilla batch file already that installs all the necessary apps. I'm trying to add to this file and have it assign the computers name under "domain join", uninstall certain apps, turn on certain features, etc.
As of right now, I only tried wmic product where name "product name" call uninstall
This isn't working when I try wmic product where name "'%%Microsoft 365 - en-us%%'" but it's also not working when I try to uninstall something simply from Control Panel through cmd.
I get the error No Instance(s) Available.
I figured out how to uninstall what I wanted, (uninstall Microsoft Office 365).
Here it is, if anyone wants to use it as well:
"C:\Program Files\Common Files\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" scenario=install scenariosubtype=ARP sourcetype=None productstoremove=O365HomePremRetail.16_en-us_x-none culture=en-us version.16=16.0

silent install IBM data server client using response file, Anyone tried to install in D drive?

I am trying to install DB2 ibm data server client(version 11.1), silent install in my windows server. i am using response file for the installation. I gave the path in response file to install in D drive, but still it is installing in C drive only. the command i was using is: msiexec /i "MSI path" /q /l*v "log file path" RSP_FILE_PATH="response file path".
Check the following:
Installing Db2 products and features using a response
Some notes on MSI customization in general below.
And a link to the most commonly used library of packaging tips contributed by packagers:
https://www.itninja.com/software-library/company/ibm
Different Designs: The exact mechanism used to redirect a folder like that depends on the design of the application and the setup from the vendor, they often do something very non-standard so reverse engineering their solution fully or slightly is usually neccessary.
Itninja.com: Maybe have a look if you can find the software here in the itninja.com "software tips" section: https://www.itninja.com/software-library/company/ibm - this is a collection of comments people have made who have packaged and deployed the software in question - either unsuccessfully or successfully. I can't really tell what the exact product name is, please check.
Download: If you have a download link that is publicly accessible I can have a quick look at the MSI to determine how it is set up. Please be aware that it is much better to install an MSI directly via normal configuration mechanisms (setting public properties and / or creating a transform - sample here) than to run a setup.exe with response file (which sometimes is the only possibility depending on the overall deployment design).
How to make better use of MSI files
A couple of quick overviews:
How to parameterize msi file from electron builder
MSI Repackaging - free tool
And some further links for reference:
Change the value of a MSI property loaded from a DLL using a MSI transform
How to run an installation in /silent mode with adjusted settings

My application won't show up in Windows 10 Start search

I wrote a Win-32 desktop application in 1999 and have maintained it through the various iterations of Windows ever since. It didn't need a 64-bit address space so I never bothered to migrate it to the 64-bit apis.
Until Win 10 came along, I could type < the first few letters of my app's name> and the app would run.
In Win 10, I have to double click on the app to get it to run. If I try the app's folder and its contents show in the start menu but not the app itself. I look under all apps and the app isn't there. I've added a shortcut to the start menu but even that hint isn't enough for Windows to find the app. I tried creating a bat file that would fire off the app and placed the bat file in Programs Folder but that failed.
I never wrote an installer for the app. The app lives in its own folder which I create by dragging it from a CD or network drive as I have migrated between all the Windows iterations since Win-98.
Is there now some xml file I must create that says "This is an app. Please Microsoft, include it in the start menu?" I had thought *.exe would suffice but apparently not. Perhaps *.exe code must now reside in Programs Folder, no exceptions allowed?
If it makes any difference, the application is written in C and compiled in Visual Developer 2008. It reads kid's handwritten responses to arithmetic questions.
More info I've dug up...
I noticed that Python shows up in Windows search but PHP doesn't. IIRC, I installed python with an installer whereas php was unzipped into its current location.
That establishes that a program need not reside in C:\Program Folder to show up in Start-search.
Then I discover that Python has a shortcut in C:\ProgramData\Microsoft\Windows\Start Menu\Programs but PHP doesn't. "That's it!" I think. Nope. Start-search now shows the folder I placed there but not the shortcut to the program. So residence in the start menu folder doesn't do it.
I am obnoxed.
..even more info...
I recompiled the entire project and now search finds the executable which suggests start-search is broken. Moreover, start-search only displays the app if I completely type its name. In Win 7, just the first few letters suffice as is the case with most executables in win10.
The app still doesn't appear in the all apps section but then again, neither do the autodesk apps I have installed. OTOH, the autodesk apps appear by typing just a few letters.
At this point, it appears win10 start-search is broken.
Most .exe files don't appears in Windows Search under Win10 unless they are installed in program files folder... I try to find a way to circumvent this limitation cause lot of my files are portable applications on another drive.
In meantime here's a Workaround: Make a folder "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\DummyApps" and copy the shortcut of the app you want to be listed in "Search Results" in the DummyApps folder.
I've made a shorcut of "DummyApps" on my desktop to drop shortcut of programs I want to access by the search.
Regards
When you say
I've added a shortcut to the start menu but even that hint isn't enough for Windows to find the app
do you mean that you added a shortcut here: C:\ProgramData\Microsoft\Windows\Start Menu\Programs ?
If so, did you restart your pc (or at least explorer.exe)?
Adding a shortcut to the location above and restarting explorer.exe worked for me and it even added the app to the recently added apps section. Hopefully that helps.
step 1:win10 +x, open cmd adminstration mode
step 2:input 'start powershell' in cmd
step 3:input 'Get-AppXPackage -Name Microsoft.Windows.Cortana | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}' in powershell

Can I Run Windows Installer (msiexec) from a Windows Batch File?

Ok, I'm out of my element but here goes anyway.
I need to do a silent install of a vendor supplied windows program. The vendor supplied an MSI file to use with the install. I created a bat file to run msiexec that contains the following line:
msiexec /i "C:\archibussilent\afm\ARCHIBUS 19.msi" /L*V C:\archibussilent\log\msi_SETUP.log
When I execute the bat file an error dialog pops up that says:
"This installation cannot be run by directly launching the MSI package. You must run setup.exe"
and the msiexe error log says:
MSI (c) (80:B0) [15:48:02:588]: Note: 1: 1729
MSI (c) (80:B0) [15:48:02:589]: Product: ARCHIBUS 19 -- Configuration failed.
MSI (c) (80:B0) [15:48:02:590]: Windows Installer reconfigured the product. Product Name: ARCHIBUS 19. Product Version: 19.3.30032.003. Product Language: 1033. Manufacturer: ARCHIBUS, Inc.. Reconfiguration success or error status: 1603.
The error # is 1603 which implies a permissions problem but I've checked the access privileges and don't see any problem.
Is it true that I can't run msiexe without running Setup.exe?
Any help is appreciated - Thanks.
The "you must run setup.exe" is a vendor authored requirement not specific to MSI in general. They may have had a good reason for it or they may have just authored it as a gate check to not have to test other scenarios.
You'll have to edit the MSI with ORCA and look at the LaunchCondition and InstallExecuteSequence tables to figure out how they implemented. Then you can create a transform to bypass the check or possible pass a property in such as SETUPEXEDRIVEN=1 to simulate being called from setup.exe. (One particularly large and well known installer development product passes this into their MSI when you create a setup.exe with it.)
The setup.exe may be serving a purpose. For example it might be authored with a manifest requiring elevation or it might be downloading and installing prerequisites or possible making sure the MSI is cached in a given location for future installation transactions.
Also I assume you want to add a /QB or /QN to make the install go silent. You'll like also need to have already elevated the cmd session prior to calling since MSI doesn't support UAC prompts when installing silently.
This is most likely an Installscript MSI file made using Installshield. This is a non-standard MSI file featuring more advanced GUI and a few other advantages. In my opinion this is a particularly problematic type of setup due to a few serious bugs without suitable workarounds. I consistently recommend this project type to never be used. It is especially problematic for corporate deployment.
These setups feature a number of command line parameters for the setup.exe file. As Chris states you can probably run it via a transform and set the property SETUPEXEDRIVEN=1 and you may try to use setup.exe /a to run an admin install (More info: purpose of an admin install). This will extract all cab files (if any) from the MSI and put the files on a "network installation location" for use in corporate networks - essentially a smaller MSI with the setup files next to it. I have seen setups that then will allow to be run directly from the MSI - just give that a shot too.
As to the reason why these setups require setup.exe to launch:
In prior editions of Installshield the Installscript language runtime had to be installed prior to launching an Installscript based MSI. This appears to no longer be the case since Installscript is now run without a runtime.
The setup.exe is there to install any updates to the Windows Installer Engine (msiexec.exe), and for that to be possible a setup.exe launcher is needed. Such an update is rarely required, and should today be done via Windows Update.
A number of legacy features, such as being able to access the Internet (!) via the setup.exe (highly undesirable for corporate use), download runtimes and components and extract temporary files are also done via the setup.exe.
And there are other features too, most of which are undesirable for corporate deployment.
Here is a previous answer from me on a similar issue featuring a link to a PDF with actual sample command lines.

how to deploy Windows WPF Application?

I have a simple Windows Form application(WPF) with entity framework. After compiled, only a few files generated:
EntityFramework.dll
EntityFramework.xml
MyApp.exe
MyApp.application
MyApp.exe.config
...
Then I just copy following files to a network shared folder:
EntityFramework.dll
MyApp.exe
MyApp.exe.config
Then I can double click on MyApp.exe from developer computer the launch the app, but can not launch from another end user computer.
How to resolve this problem?
When you double click, app is not launching means certainly it is crashing so type the command eventvwr in run or cmd it'll open the Event viewer in that go to Windows Logs and Click on Application, you can see different levels of logs in that just find the last error log view the details it might help you
Have a look in the event log on the target computer and look at the error that is actually being reported.
It could be a missing installation of the correct version of the DotNet framework as suggested in the comments above, or it could also be that the execution policy of the target computer is preventing the user from running from a network drive (As a developer you probably have admin rights on your local pc allowing you to do this).
Whatever the actual cause you are always better to use some form of installer, rather than this form of putting files on the network (commonly known as xcopy deployment).
Probably the best solution is to use Visual studio to generate you a click once installer and publish it to your network drive. This will then copy the application locally on the users pc and run it from there.

Resources