Views
opsi wiki page
>>
Opsi Client Rollout
last edited 2 years ago by matze
Before taking the benefits of an automatic software distribution
system, there's a problem: Installing Opsi on clients without an
automatic software distribution. An easy way to manage the rollout
is the use of the programm RUNASSPC in login-scripts. It is free of
charge for private use and does almost the same like runas at Windows
XP. But RUNASSPC can be used in a script.
@ECHO OFF
REM Do the installation, if theres is no c:\opsi
SET INSTALLSOURCE=Q:\Software\Opsi_Client
SET CONFIG=%INSTALLSOURCE%\files/opsi/cfg/config.ini
SET USERNAME=adminuser
SET PASSWORD=adminpass word
SET DOMAIN=WINDOMAIN
SET OPSITEMP=%TEMP%\OPSITEMP
if exist %SYSTEMDRIVE%\opsi goto exists
REM Create the directory and copy the Preconfig
if not exist %SYSTEMDRIVE%\opsi\. mkdir %SYSTEMDRIVE%\opsi\.
if not exist %SYSTEMDRIVE%\opsi\cfg\. mkdir %SYSTEMDRIVE%\opsi\cfg\.
copy /Y "%CONFIG%" "%SYSTEMDRIVE%\opsi\cfg\config.ini"
REM Copying the installationfiles to local TEMP
if not exist "%OPSITEMP%\." mkdir "%OPSITEMP%\."
xcopy /Y /C /E "%INSTALLSOURCE%\ProgrammFiles\*.*" "%OPSITEMP%"
REM Installation via RUNASSPC
%OPSITEMP%\files\opsi\utils\runasspc.exe /program:"%OPSITEMP%\files\opsi\utils\winst32.exe /batch %OPSITEMP%\files\opsi\preloginloader.ins %TEMP%\preloginloader.log /PARAMETER LOCAL" /domain:"%DOMAIN%" /user:"%USERNAME%" /password:"%PASSWORD%"
goto end
:exists
REM Deleting the unused installationfiles (at the second run)
rmdir /S /Q "%OPSITEMP%\."
:end