Posted On July 17, 2019

Script to Deploy Executables

kimconnect 0 comments
blog.KimConnect.com >> Codes >> Script to Deploy Executables
set InstallRevision=1.0
set TargetDir="%ProgramFiles%\Program Name"

REM Check to see if the software has been installed. Check for both 32 and 64 bit platforms.
if exist "%ProgramFiles(x86)%\Program Name" set TargetDir=%ProgramFiles(x86)%\Program Name"
if exist "%TargetDir%\%InstallRevision.txt" goto Finish


"\\FILESERVER01\Software\something.exe -quiet"
goto Finish

:Finish

echo %InstallRevision% > "%TargetDir%\%InstallRevision%.txt"
goto Finish

:Finish
EXIT

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Microsoft Dynamics Update All Organizations

# updateCrmOrgs.ps1 function updateCrmOrgs{ try{ Add-PSSnapin Microsoft.Crm.Powershell $servers=Get-CrmServer $highestVersion=($servers.Version|measure-object -Maximum).Maximum $lowVersionServers=$servers|?{[version]$_.Version -lt [version]$highestVersion} if($lowVersionServers){ write-warning…

PowerShell: Trigger Azure AD Sync on Remote Server as a Domain Admin

# Trigger-AD-Sync.ps1# Requirements: https://blog.kimconnect.com/powershell-install-rsat/## This script does these things:# a. Obtain Domain Admin credential# b.…

PowerShell: Activate Remote Windows

$remoteWindows="SHERVER01","SHERVER02"$licenseKey="XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"function activateWindows{ param( [string]$key ) $licensingService = get-wmiObject -query "select * from SoftwareLicensingService" -computername $env:computername;…