Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Update MSI if the first user install is different user update #2664

Open
fennec622 opened this issue Nov 5, 2024 · 3 comments
Open

Comments

@fennec622
Copy link

fennec622 commented Nov 5, 2024

Hi

I use cx_Freeze 7.2.4 for create MSI installation on PC without admin account

So i install all in folder C:\Monitoring, all user who use PC can read and write on C:\

Each user when change must login, all user can delete folder C:\Monitoring, so write is ok

If install MSi with user A and after User B login and wan't to update Monitoring with new version he can't

I have always error

image

So User B delete C:\Monitoring and restart MSI for install all is ok

If i install MSI with User A and User A make update no error

Do you know why ??

Thanks a lot

from cx_Freeze import setup, Executable

import sys
import os

author = ""
author_email = ''
name=""
description=""

upgrade_code = '{A15DEFCC-CA3D-3D8B-BC1A-AB99668D0083}'

build_exe_options = {
    "includes":["psutil","requests"],
    "excludes":["PyQt5"],
    "build_exe":"Roquette_Monitoring",
    "include_files":['zlib.dll',"Installation.txt","version.txt","Installation Monitoring.url",'Server_Monitoring/','COPIER COLLER MONITORING SUR BUREAU','NE PAS BOUGER ROQUETTE_MONITORING EXE'],
    "bin_includes":[ 'Server_Monitoring/python3.dll','Server_Monitoring/python310.dll','Server_Monitoring/zlib.dll','Server_Monitoring/','Server_Monitoring/Roquette_Display/python3.dll','Server_Monitoring/Roquette_Display/python310.dll','Server_Monitoring/Roquette_Display/zlib.dll']
    }

shortcut_table = [
    ("DesktopShortcut",        # Shortcut
     "DesktopFolder",          # Directory_
     "Monitoring",           # Name
     "TARGETDIR",              # Component_
     "[TARGETDIR]Roquette_Monitoring.exe",# Target
     None,                     # Arguments
     None,                     # Description
     None,                     # Hotkey
     None,                     # Icon
     None,                     # IconIndex
     None,                     # ShowCmd
     'TARGETDIR'               # WkDir
     ),
    (
        "StartMenuShortcut",         # Shortcut
        "StartMenuFolder",           # Directory_
        "Monitoring",          # Name
        "TARGETDIR",                 # Component_
        "[TARGETDIR]Roquette_Monitoring.exe",         # Target
        None,                        # Arguments
        None,                        # Description
        None,                        # Hotkey
        None,                          # Icon - None for default
        None,                        # IconIndex
        None,                        # ShowCmd
        "TARGETDIR",                 # WkDir
    ),
    (
        "TARGETDIR",         # Shortcut
        "TARGETDIR",           # Directory_
        "Monitoring",          # Name
        "TARGETDIR",                 # Component_
        "[TARGETDIR]Roquette_Monitoring.exe",         # Target
        None,                        # Arguments
        None,                        # Description
        None,                        # Hotkey
        None,                          # Icon - None for default
        None,                        # IconIndex
        None,                        # ShowCmd
        "TARGETDIR",                 # WkDir
    )
    ]

msi_data = {"Shortcut": shortcut_table}


bdist_msi_options = {
    'add_to_path': False,
    'initial_target_dir': 'C:\%s' % (name),
    'data': msi_data,
    "all_users": False,
}

options = {
    'build_exe': build_exe_options,
    'bdist_msi': bdist_msi_options
}


base = 'Win32GUI'
icon = 'favicon.ico'

mainexe = Executable(
    'Roquette_Monitoring.py',
    base = base,
    icon = icon
)

setup(
    name=name,
    author=author,
    author_email=author_email,
    description=description,
    options=options,
    executables=[mainexe]
)
@marcelotduarte
Copy link
Owner

Try it with all_users True.

@fennec622
Copy link
Author

Thanks for you help

I dont have admin account

And when I put user all Windows ask Password admin

@marcelotduarte
Copy link
Owner

marcelotduarte commented Nov 5, 2024

From documentation:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants