05.02.2013 Views

opsi manual opsi version 4.0.2 - opsi Download - uib

opsi manual opsi version 4.0.2 - opsi Download - uib

opsi manual opsi version 4.0.2 - opsi Download - uib

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>opsi</strong> <strong>manual</strong> <strong>opsi</strong> <strong>version</strong> <strong>4.0.2</strong><br />

endif<br />

comment "The profile part ..."<br />

Files_profile_del<br />

Registry_currentuser_del<br />

[Winbatch_uninstall]<br />

"$UninstallProgram$" /silent /norestart<br />

[Files_profile_del]<br />

del -s -f "%CurrentAppdataDir%\ACME"<br />

del "%userprofiledir%\<strong>opsi</strong>-winst-test.ini"<br />

[Registry_currentuser_del]<br />

deletekey [HKCU\Software\ACME]<br />

147 / 193<br />

Now a variant which is variant of the example before. It makes use of the new primary section ProfileAction. This<br />

makes the script shorter and it may be still used as installation script and as userLoginScript as well.<br />

[Actions]<br />

requiredWinstVersion >= "4.11.3.2"<br />

DefVar $ProductId$<br />

DefVar $InstallDir$<br />

Set $ProductId$ = "ACME"<br />

Set $InstallDir$ = "%ProgramFiles32Dir%\ACME"<br />

comment "Show product picture"<br />

ShowBitmap "%ScriptPath%\\" + $ProductId$ + ".png" $ProductId$<br />

Message "Installing " + $ProductId$ + " ..."<br />

comment "Start setup program"<br />

Winbatch_install<br />

comment "Patch the local Profiles ..."<br />

ProfileActions<br />

[ProfileActions]<br />

comment "login part"<br />

Files_profile_copy<br />

Registry_currentuser_set<br />

Patches_profile_ini "%userprofiledir%\<strong>opsi</strong>-winst-test.ini"<br />

[Winbatch_install]<br />

"%ScriptPath%\setup.exe" /sp- /silent /norestart<br />

[Files_profile_copy]<br />

copy "%Scriptpath%\profiles\*.*" "%CurrentProfileDir%\Appdata\ACME"<br />

[Registry_currentuser_set]<br />

openkey [HKCU\Software\ACME]<br />

set "show_greeting_window" = "no"<br />

[Patches_profile_ini]<br />

add [secdummy] dummy1=add1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!