User Tools

Site Tools


userspace:notepad2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
userspace:notepad2 [2012/07/12 14:08]
SisterOfMercy created
userspace:notepad2 [2021/08/23 08:37] (current)
Line 6: Line 6:
  
 During the installation a notepad2.ini is copied to the installation directory of notepad2, which redirects notepad2 to use the ini file in the Application Data folder of the user. This way each user can mess with his own settings. \\ During the installation a notepad2.ini is copied to the installation directory of notepad2, which redirects notepad2 to use the ini file in the Application Data folder of the user. This way each user can mess with his own settings. \\
 +
 +==== %scriptpath%\files\programfiles\notepad2.ini ====
 +
 +<code winst>
 +[Notepad2]
 +Notepad2.ini=%APPDATA%\Notepad2.ini
 +</code>
 +
 +==== %scriptpath%\files\appdata\notepad2.ini ====
 +
 +<code winst>
 +[Notepad2]
 +[Settings]
 +SaveSettings=0
 +SaveRecentFiles=0
 +SaveFindReplace=0
 +CloseFind=0
 +CloseReplace=0
 +NoFindWrap=0
 +OpenWithDir=%USERPROFILE%\Desktop
 +Favorites=%CSIDL:MYDOCUMENTS%
 +PathNameFormat=2
 +WordWrap=0
 +WordWrapMode=0
 +WordWrapIndent=0
 +WordWrapSymbols=22
 +ShowWordWrapSymbols=0
 +MatchBraces=1
 +AutoCloseTags=0
 +HighlightCurrentLine=0
 +AutoIndent=1
 +ShowIndentGuides=0
 +TabsAsSpaces=0
 +TabIndents=1
 +BackspaceUnindents=0
 +TabWidth=8
 +IndentWidth=0
 +MarkLongLines=0
 +LongLinesLimit=72
 +LongLineMode=1
 +ShowSelectionMargin=0
 +ShowLineNumbers=1
 +ViewWhiteSpace=0
 +ViewEOLs=0
 +DefaultEncoding=0
 +SkipUnicodeDetection=0
 +LoadASCIIasUTF8=0
 +NoEncodingTags=0
 +DefaultEOLMode=0
 +FixLineEndings=1
 +FixTrailingBlanks=0
 +PrintHeader=1
 +PrintFooter=0
 +PrintColorMode=3
 +PrintZoom=10
 +PrintMarginLeft=2000
 +PrintMarginTop=2000
 +PrintMarginRight=2000
 +PrintMarginBottom=2000
 +SaveBeforeRunningTools=0
 +FileWatchingMode=0
 +ResetFileWatching=1
 +EscFunction=0
 +AlwaysOnTop=0
 +MinimizeToTray=0
 +TransparentMode=0
 +ToolbarButtons=1 2 3 4 0 5 6 0 7 8 9 0 10 11 0 12 0 13 14 0 15 16 0 17
 +ShowToolbar=1
 +ShowStatusbar=1
 +EncodingDlgSizeX=256
 +EncodingDlgSizeY=262
 +RecodeDlgSizeX=256
 +RecodeDlgSizeY=262
 +FileMRUDlgSizeX=412
 +FileMRUDlgSizeY=376
 +OpenWithDlgSizeX=384
 +OpenWithDlgSizeY=386
 +FavoritesDlgSizeX=334
 +FavoritesDlgSizeY=316
 +FindReplaceDlgPosX=0
 +FindReplaceDlgPosY=0
 +[Window]
 +1600x900 PosX=744
 +1600x900 PosY=16
 +1600x900 SizeX=840
 +1600x900 SizeY=840
 +1600x900 Maximized=0
 +[Custom Colors]
 +01=#000000
 +02=#0A246A
 +03=#3A6EA5
 +04=#003CE6
 +05=#006633
 +06=#608020
 +07=#648000
 +08=#A46000
 +09=#FFFFFF
 +10=#FFFFE2
 +11=#FFF1A8
 +12=#FFC000
 +13=#FF4000
 +14=#C80000
 +15=#B000B0
 +16=#B28B40
 +[Styles]
 +Use2ndDefaultStyle=0
 +DefaultScheme=0
 +AutoSelect=1
 +SelectDlgSizeX=304
 +SelectDlgSizeY=324
 +[Recent Files]
 +[Recent Find]
 +[Recent Replace]
 +</code>
  
 ==== control file ==== ==== control file ====
Line 11: Line 125:
 <code winst> <code winst>
 [Package] [Package]
-version: 2+version: 1
 depends:  depends: 
 incremental: False incremental: False
Line 18: Line 132:
 type: localboot type: localboot
 id: notepad2 id: notepad2
-name: Notepad2 Editor +name: Notepad2 Text Editor 
-description: Replacement for Windows Notepad+description: Notepad2 is a fast and lightweight Notepad-like text editor with syntax highlighting.
 advice:  advice: 
 version: 4.2.25 version: 4.2.25
-priority: -50+priority: 0
 licenseRequired: False licenseRequired: False
 productClasses:  productClasses: 
-setupScript: setup.ins +setupScript: setup3264.ins 
-uninstallScript: uninstall.ins+uninstallScript: uninstall3264.ins
 updateScript:  updateScript: 
 alwaysScript:  alwaysScript: 
Line 32: Line 146:
 customScript:  customScript: 
 userLoginScript:  userLoginScript: 
- 
-[ProductProperty] 
-type: unicode 
-name: install_architecture 
-multivalue: False 
-editable: True 
-description: Defines x86 or x64 architecture 
-values: ["32 only", "64 only", "both", "system specific"] 
-default: ["system specific"] 
  
 [Changelog] [Changelog]
Line 47: Line 152:
   * Initial package   * Initial package
  
- -- ICT <ict@gcecad-service.nl>  Thu, 21 Jun 2012 03:03:14 +0000  + -- ICT <ict@gcecad-service.nl>  Thu, 03 Apr 2014 19:01:31 +0000 
-</code>+ </code>
  
  
-==== setup.ins ====+==== setup3264.ins ====
  
 <code winst> <code winst>
 +; Copyright (c) uib gmbh (www.uib.de)
 +; This sourcecode is owned by uib
 +; and published under the Terms of the General Public License.
 +; credits: http://www.opsi.org/en/credits/
 +;
 +; License Management removed
 +
 +
 [Actions] [Actions]
 requiredWinstVersion >= "4.10.8.6" requiredWinstVersion >= "4.10.8.6"
  
 +;DefVar $MsiId32$
 +;DefVar $UninstallProgram32$
 +;DefVar $MsiId64$
 +;DefVar $UninstallProgram64$
 DefVar $LogDir$ DefVar $LogDir$
 DefVar $ProductId$   DefVar $ProductId$  
Line 64: Line 181:
 DefVar $ExitCode$ DefVar $ExitCode$
 DefVar $INST_SystemType$ DefVar $INST_SystemType$
-DefVar $INST_architecture$+;DefVar $INST_architecture
 +DefVar $INST_MsVersion$
  
 +set $INST_MsVersion$ = GetMsVersionInfo
 Set $INST_SystemType$ = GetSystemType Set $INST_SystemType$ = GetSystemType
-set $INST_architecture$ = GetProductProperty("install_architecture","system specific")+;set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 Set $LogDir$ = "%SystemDrive%\tmp" Set $LogDir$ = "%SystemDrive%\tmp"
  
Line 77: Line 196:
 ; no white space use '-' as a seperator ; no white space use '-' as a seperator
 Set $ProductId$       = "notepad2" Set $ProductId$       = "notepad2"
-Set $MinimumSpace$    = "10 MB"+Set $MinimumSpace$    = "50 MB"
 ; the path were we find the product after the installation ; the path were we find the product after the installation
 Set $InstallDir32$      = "%ProgramFiles32Dir%\" + $ProductId$ Set $InstallDir32$      = "%ProgramFiles32Dir%\" + $ProductId$
Line 87: Line 206:
  isFatalError  isFatalError
  ; Stop process and set installation status to failed  ; Stop process and set installation status to failed
-else 
- comment "Show product picture" 
- ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ 
- comment "installing" 
- 
- if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only") 
- Message "Installing " + $ProductId$ + " 32 Bit..." 
- comment "Start setup program" 
- Winbatch_install_32 
- Sub_check_exitcode 
- comment "Copy files" 
- Files_install_32 /32Bit 
- comment "Copy files to all userprofiles" 
- Files_install_allusers /AllNTUserProfiles 
 endif endif
 +if $INST_MsVersion$ < "5.1"
 + LogError "Windows XP or newer is required for " + $ProductId$  
 + isFatalError
 +endif
 +
 +comment "Show product picture"
 +ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
  
- if ($INST_SystemType$ = "64 Bit System"and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) +if FileExists("%ScriptPath%\delsub3264.ins") 
- Message "Installing " + $ProductId$ + " 64 Bit..." + comment "Start uninstall sub section
- comment "Start setup program+ Sub "%ScriptPath%\delsub3264.ins
- Winbatch_install_64 +endif
- Sub_check_exitcode +
- comment "Copy files" +
- Files_install_64 /64Bit +
- comment "Copy files to all userprofiles" +
- Files_install_allusers /AllNTUserProfiles +
- endif+
   
 +comment "installing"
 +
 +if ($INST_SystemType$ = "x86 System"
 +;and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
 + Message "Installing " + $ProductId$ + "..."
 + comment "Start setup program"
 + Winbatch_install_32
 + Sub_check_exitcode
 + comment "Copy files"
 + Files_install_32 /32Bit
 + comment "Patch Registry"
 + Registry_install /32Bit
 + comment "Copy files to all userprofiles"
 + Files_install_allusers /AllNTUserProfiles
 + comment "Create shortcuts"
 + LinkFolder_install
 endif endif
 +
 +if ($INST_SystemType$ = "64 Bit System"
 +;and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
 + Message "Installing " + $ProductId$ + "..."
 + comment "Start setup program"
 + Winbatch_install_64
 + Sub_check_exitcode
 + comment "Copy files"
 + Files_install_64 /64Bit
 + comment "Patch Registry"
 + Registry_install /64Bit
 + comment "Copy files to all userprofiles"
 + Files_install_allusers /AllNTUserProfiles
 + comment "Create shortcuts"
 + LinkFolder_install
 +endif
 +
  
 [Winbatch_install_32] [Winbatch_install_32]
Line 131: Line 270:
 copy -s "%ScriptPath%\files\appdata\Notepad2.ini" "%UserProfileDir%\Application Data\" copy -s "%ScriptPath%\files\appdata\Notepad2.ini" "%UserProfileDir%\Application Data\"
  
 +[Registry_install]
 +; Example of setting some values of an registry key:
 +;
 +; openkey [HKEY_LOCAL_MACHINE\Software\$ProductId$]
 +; set "name1" = "some string value"
 +; set "name2" = REG_DWORD:0001
 +; set "name3" = REG_BINARY:00 af 99 cd
  
 +[LinkFolder_install]
 +; Example of deleting a folder from AllUsers startmenu:
 +;
 +; set_basefolder common_programs
 +; delete_subfolder $ProductId$
 +;
 +; Example of creating an shortcut to the installed exe in AllUsers startmenu:
 +;
 +; set_basefolder common_programs
 +; set_subfolder $ProductId$
 +;
 +; set_link
 +; name: $ProductId$
 +; target: <path to the program>
 +; parameters:
 +; working_dir: $InstallDir$
 +; icon_file:
 +; icon_index:
 +; end_link
 +;
 +; Example of creating an shortcut to the installed exe on AllUsers desktop:
 +;
 +; set_basefolder common_desktopdirectory
 +; set_subfolder ""
 +;
 +; set_link
 +; name: $ProductId$
 +; target: <path to the program>
 +; parameters: <some_param>
 +; working_dir: $InstallDir$
 +; icon_file: <path to icon file>
 +; icon_index: 2
 +; end_link
  
  
Line 164: Line 343:
 </code> </code>
  
-==== uninstall.ins ====+==== uninstall3264.ins ====
  
-<code winst> +<code winst>; Copyright (c) uib gmbh (www.uib.de)
-; Copyright (c) uib gmbh (www.uib.de)+
 ; This sourcecode is owned by uib gmbh ; This sourcecode is owned by uib gmbh
 ; and published under the Terms of the General Public License. ; and published under the Terms of the General Public License.
 ; credits: http://www.opsi.org/en/credits/ ; credits: http://www.opsi.org/en/credits/
 +;
 +; License Management removed
  
 [Actions] [Actions]
 requiredWinstVersion >= "4.10.8.6" requiredWinstVersion >= "4.10.8.6"
  
-DefVar $UninstallProgram32$ +;DefVar $MsiId32$ 
-DefVar $UninstallProgram64$+;DefVar $UninstallProgram32$ 
 +;DefVar $MsiId64$ 
 +;DefVar $UninstallProgram64$
 DefVar $LogDir$ DefVar $LogDir$
 DefVar $ExitCode$ DefVar $ExitCode$
Line 183: Line 365:
 DefVar $InstallDir64$ DefVar $InstallDir64$
 DefVar $INST_SystemType$ DefVar $INST_SystemType$
-DefVar $INST_architecture$+;DefVar $INST_architecture$
  
 Set $INST_SystemType$ = GetSystemType Set $INST_SystemType$ = GetSystemType
-set $INST_architecture$ = GetProductProperty("install_architecture","system specific")+;set $INST_architecture$ = GetProductProperty("install_architecture","system specific") 
 + 
 Set $LogDir$ = "%SystemDrive%\tmp" Set $LogDir$ = "%SystemDrive%\tmp"
  
Line 196: Line 380:
 Set $InstallDir64$      = "%ProgramFiles64Dir%\" + $ProductId$ Set $InstallDir64$      = "%ProgramFiles64Dir%\" + $ProductId$
 ; ---------------------------------------------------------------- ; ----------------------------------------------------------------
 +
  
 comment "Show product picture" comment "Show product picture"
 ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$ ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
 +
 +Message "Uninstalling " + $ProductId$ + " ..."
 +
 +if FileExists("%ScriptPath%\delsub3264.ins")
 + comment "Start uninstall sub section"
 + Sub "%ScriptPath%\delsub3264.ins"
 +endif
 +</code>
 +
 +==== delsub3264.ins ====
 +
 +<code winst>
 +; Copyright (c) uib gmbh (www.uib.de)
 +; This sourcecode is owned by uib gmbh
 +; and published under the Terms of the General Public License.
 +; credits: http://www.opsi.org/en/credits/
 +;
 +; License Management removed
 +
 +DefVar $UninstallProgram32$
 +DefVar $UninstallProgram64$
  
 Set $UninstallProgram32$ = $InstallDir32$ + "\Notepad2.inf" Set $UninstallProgram32$ = $InstallDir32$ + "\Notepad2.inf"
 Set $UninstallProgram64$ = $InstallDir64$ + "\Notepad2.inf" Set $UninstallProgram64$ = $InstallDir64$ + "\Notepad2.inf"
-                                         + 
-if (($INST_SystemType$ = "x86 System") and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only"+if ($INST_SystemType$ = "x86 System" 
- Message "Uninstalling " + $ProductId$ + " 32 Bit..."+;and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only"
 + Message "Uninstalling " + $ProductId$ + "..."
  
  if FileExists($UninstallProgram32$)  if FileExists($UninstallProgram32$)
Line 211: Line 418:
  sub_check_exitcode  sub_check_exitcode
  endif  endif
 +
 +; if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
 +; comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
 +; Winbatch_uninstall_msi_32
 +; sub_check_exitcode
 +; endif
 +
  comment "Delete files"  comment "Delete files"
 + Files_uninstall_32 /32Bit
  Files_uninstall_allusers /AllNTUserProfiles  Files_uninstall_allusers /AllNTUserProfiles
 + comment "Cleanup registry"
 + Registry_uninstall /32Bit
 endif endif
  
- +if ($INST_SystemType$ = "64 Bit System" 
-if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) +;and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only")) 
- Message "Uninstalling " + $ProductId$ + " 64 Bit..."+ Message "Uninstalling " + $ProductId$ + "..."
  
  if FileExists($UninstallProgram64$)  if FileExists($UninstallProgram64$)
  comment "Uninstall program found, starting uninstall"  comment "Uninstall program found, starting uninstall"
- ExecWith_uninstall_64 "%SystemRoot%\cmd64.exe" /C+ Winbatch_uninstall_64
  sub_check_exitcode  sub_check_exitcode
  endif  endif
- + 
 +; if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = ""
 +; comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall" 
 +; Winbatch_uninstall_msi_64 
 +; sub_check_exitcode 
 +; endif 
 +
  comment "Delete files"  comment "Delete files"
 + Files_uninstall_64 /64Bit
  Files_uninstall_allusers /AllNTUserProfiles  Files_uninstall_allusers /AllNTUserProfiles
 + comment "Cleanup registry"
 + Registry_uninstall /64Bit
 endif endif
 +
 +comment "Delete program shortcuts"
 +LinkFolder_uninstall
  
 [Winbatch_uninstall_32] [Winbatch_uninstall_32]
 rundll32.exe advpack.dll,LaunchINFSectionEx  "$UninstallProgram32$",DefaultUninstall,,8,N rundll32.exe advpack.dll,LaunchINFSectionEx  "$UninstallProgram32$",DefaultUninstall,,8,N
  
-[ExecWith_uninstall_64]+[Files_uninstall_32] 
 +; Example for recursively deleting the installation directory (don't forget the trailing backslash): 
 +
 +; delete -sf "$InstallDir32$\" 
 + 
 +[Winbatch_uninstall_64]
 rundll32.exe advpack.dll,LaunchINFSectionEx  "$UninstallProgram64$",DefaultUninstall,,8,N rundll32.exe advpack.dll,LaunchINFSectionEx  "$UninstallProgram64$",DefaultUninstall,,8,N
 +
 +[Files_uninstall_64]
 +; Example for recursively deleting the installation directory (don't forget the trailing backslash):
 +;
 +; delete -sf "$InstallDir64$\"
 +
  
 [Files_uninstall_allusers] [Files_uninstall_allusers]
-delete -f "%UserProfileDir%\Application Data\Notepad2.ini"+delete -f "%AppdataDir%\Notepad2.ini" 
 + 
 +[Registry_uninstall] 
 +; Example of deleting a registry key: 
 +
 +; deletekey [HKEY_LOCAL_MACHINE\Software\$ProductId$] 
 + 
 +[LinkFolder_uninstall] 
 +; Example of deleting a folder from AllUsers startmenu: 
 +
 +; set_basefolder common_programs 
 +; delete_subfolder $ProductId$ 
 +
 +; Example of deleting a shortcut from AllUsers desktop: 
 +
 +; set_basefolder common_desktopdirectory 
 +; set_subfolder "" 
 +; delete_element $ProductId$
  
 [Sub_check_exitcode] [Sub_check_exitcode]
Line 266: Line 523:
  endif  endif
 endif endif
- 
 </code> </code>
userspace/notepad2.1342102111.txt.gz · Last modified: 2021/08/23 08:37 (external edit)