Send a message (MessageBox) / .reg
Published: July 1, 2020 - 12:37 PM
Hello everyone,
I'd like to create a MessageBox in the `def install()` function to inform the user that they must restart their machine after installing the package (registry key declaration in the session setup() function).
However, I'm getting a timeout when I install the package, even though I don't encounter any problems on my own machine.
Here's the code I'm using:
`win32ui.MessageBox('test','test')`
or
`os.system('cmd /c "msg /TIME:1750 %username% test"')`
I tried to work around the problem by writing the key (HKCU) in the `def install()` function, but it doesn't work. Is it possible to install the package as the machine's user account, rather than using the System account, to write the key to the HKCU?
Another inconclusive test: I copied a .reg file to the root of my hard drive and then ran it with this code:
`run(r'REG IMPORT C:\test.reg')`
or
`subprocess.call(['reg', 'import', C:\test.reg])`.
Do you have any idea what the problem might be?
Thank you in advance for your help.
Best regards,
Adrien
I'd like to create a MessageBox in the `def install()` function to inform the user that they must restart their machine after installing the package (registry key declaration in the session setup() function).
However, I'm getting a timeout when I install the package, even though I don't encounter any problems on my own machine.
Here's the code I'm using:
`win32ui.MessageBox('test','test')`
or
`os.system('cmd /c "msg /TIME:1750 %username% test"')`
I tried to work around the problem by writing the key (HKCU) in the `def install()` function, but it doesn't work. Is it possible to install the package as the machine's user account, rather than using the System account, to write the key to the HKCU?
Another inconclusive test: I copied a .reg file to the root of my hard drive and then ran it with this code:
`run(r'REG IMPORT C:\test.reg')`
or
`subprocess.call(['reg', 'import', C:\test.reg])`.
Do you have any idea what the problem might be?
Thank you in advance for your help.
Best regards,
Adrien