Advertisement
Guest User

Script NSIS para programa desatendido.

a guest
Aug 23rd, 2010
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SetCompressor lzma
  2.  
  3. Name "GPro"
  4. OutFile "GuitarPro.exe"
  5. InstallDir "$PROGRAMFILES\Guitar Pro 5\"
  6. Icon "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
  7. SilentInstall silent
  8.  
  9. Section "Principal" SEC01
  10.   ;Se setea a que carpeta se copiara el instalador, en este caso a la carpeta temporal.
  11.   SetOutPath "$TEMP"
  12.   ;Se activa el reemplazo de archivo por si habia otro que se llame igual en la carpeta temporal.(Opcional, pero por las dudas se pone.)
  13.   SetOverwrite on
  14.   ;Se copia el instalador.
  15.   File "Guitar_Pro_5.2.exe"
  16.   ;Se crea el directorio para copiar la configuracion.
  17.   CreateDirectory "$PROGRAMFILES\Guitar Pro 5\data"
  18.   ;Se setea la carpeta anteriormente creada.
  19.   SetOutPath "$PROGRAMFILES\Guitar Pro 5\data"
  20.   ;Se copia el archivo de configuracion.
  21.   File "GPro500.ini"
  22. SectionEnd
  23.  
  24. Section -Post
  25.   ;Importar al registro las entradas generadas por Reg2Nsis: http://aarrtteemm.nm.ru/
  26.   WriteRegStr ;<--- Claves del registro exportadas con Reg2Nsis
  27.   ;Ejecutar el instalador con el switch desatendido. Si /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- es el switch desatendido.
  28.   ExecWait "$TEMP\Guitar_Pro_5.2.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-"
  29.   ;Borrar el instalador de la carpeta temporal
  30.   Delete "$TEMP\Guitar_Pro_5.2.exe"
  31. SectionEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement