Touch ini file if not exist

This commit is contained in:
Mario Fetka 2013-03-08 14:15:35 +01:00
parent 79d3176b78
commit f2351a2f1d
2 changed files with 4 additions and 1 deletions

View File

@ -313,6 +313,9 @@ write_ini_file() {
local ini_file=$1
local var_file=$2
# create file if not exist
touch $ini_file
# publish some other variables
for var in VENDOR PN VERSION RELEASE TYPE CREATOR_TAG CREATOR_NAME CREATOR_EMAIL ; do
$CMD_iniset $ini_file --COMMON ${var}="${!var}"

View File

@ -15,7 +15,7 @@ if FileExists($UninstallProgram$)
sub_check_exitcode
endif
if FileExists($IniFile$)
Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
Set $MsiIdOld$ = GetValueFromInifile($IniFile$,"X86_64","MsiId","{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiIdOld$ + "] DisplayName") = "")
comment "Old MSI id " + $MsiIdOld$ + " found in registry, starting msiexec to uninstall old version"
Winbatch_uninstall_msi_old