Nice scripts to install NAV RTC


Nice scripts to install NAV RTC

nice posts on NAVUG by W Mak and Mathew Ealy about this topic.

The following batch file can detect and install RTC clients on workstations

@echo off

wmic product get name,version /format:csv | find “Microsoft Dynamics NAV 2017 RoleTailored Client,10.0.14199.0”
if %errorlevel%==0 (
goto:1
) else (
goto:2
)

:1
echo NAV 2017 version 10.0.14199.0 installed, continue
goto:eof

:2
echo Checking if previous version of NAV exist, and uninstall old version
if exist “%CommonProgramFiles(x86)%\Microsoft Dynamics Nav\100\Setup\setup.exe” (
echo old version exist, start uninstalling old version
“%CommonProgramFiles(x86)%\Microsoft Dynamics Nav\100\Setup\Setup.exe” /uninstall /quiet
)
echo Installing NAV2017 10.0.14199.0 in background

net use n: {your network path that store the DVD folder}
start n:\Setup.exe /config n:\2017Config.xml /quiet

goto:eof

:eof

 

Powershell script that could be called to install and create a shortcut on the desktop to a shared executable.

import-module \\InstallMediaShare\NavInstallationTools.psm1
#Install Nav
install-navcomponent -configfile \\Share\navinstallmedia\ConfigFile.xml

#Copy Over short cut
$TargetFile = "\\Shortcut\Nav16\"
$ShortcutFile = "$env:Public\Desktop\nav16.lnk"
$Icon = "C:\Program Files (x86)\Microsoft Dynamics NAV\90\RoleTailored Client\Microsoft.Dynamics.Nav.Client.exe"
$WScriptShell = New-Object -ComObject WScript.Shell
$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)
$Shortcut.TargetPath = $TargetFile
$Shortcut.IconLocation = $Icon
$Shortcut.Save()

also a couple other powershell scripts for NAV (13 & 16) on my github page

Source on NAVUG share my code section
Annunci

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...

%d blogger hanno fatto clic su Mi Piace per questo: