UTF8 encoding and software uninstallation

Questions about WAPT Packaging / Requests and help regarding Wapt packages.
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
skoizer
Messages: 54
Registration: June 19, 2018 - 4:45 PM

July 25, 2019 - 09:26

Good morning,
wapt 1.6.2.7
I need to uninstall DWG TrueView 2018 software, but the directory contains special characters

I put this at the beginning, then

Code: Select all

# -*- coding: utf-8 -*-
the code

Code: Select all

def uninstall():
    print('uninstalling dwg trueview 2018')
run(u'"c:\Program Files\Autodesk\DWG TrueView 2018 - Français (French)\Setup\fr-FR\Setup\Setup.exe".decode("utf-8").encode("cp1252") /P {28B89EEF-1028-040C-0100-CF3F3A09B77D} /R AOEM /language fr-FR /q')
I can't find the correct syntax in the run with a path containing special characters.

here is the error

Code: Select all

CalledProcessErrorOutput: Command '"c:\\Program Files\\Autodesk\\DWG TrueView 2018 - Fran\xc3\xa7ais (French)\\Setup\x0cr-FR\\Setup\\Setup.exe" /P {28B89EEF-1028-040C-0100-CF3F3A09B77D} /R AOEM /language fr-FR /q' returned non-zero exit status 1.
Output:Le chemin d'accŠs sp‚cifi‚ est introuvable.
I tried with double sides, single sides, etc.

I have the same problem

Any ideas on the syntax?

I used this post as a guide: viewtopic.php?t=29
User avatar
htouvet
WAPT Expert
Messages: 436
Registration: March 16, 2015 - 10:48
Contact :

July 25, 2019 - 10:08

Perhaps by adding an "r" before the string, because there are backslashes in the string that should not be interpreted.

Code: Select all

def uninstall():
    print('uninstalling dwg trueview 2018')
run(ur'"c:\Program Files\Autodesk\DWG TrueView 2018 - Français (French)\Setup\fr-FR\Setup\Setup.exe" /P {28B89EEF-1028-040C-0100-CF3F3A09B77D} /R AOEM /language fr-FR /q')
Tranquil IT
skoizer
Messages: 54
Registration: June 19, 2018 - 4:45 PM

July 25, 2019 - 1:16 PM

Thanks for your reply
I tried using ur but it doesn't work
When I try the command below, the program starts.

Code: Select all

run(ur'"c:\Program Files\Autodesk\DWG TrueView 2018 - Français (French)\Setup\fr-FR\Setup\Setup.exe")
I'm sure it's the command line, because if I run the program manually, it does a silent install
"c:\Program Files\Autodesk\DWG TrueView 2018 - Français (French)\Setup\fr-FR\Setup\Setup.exe" /P {28B89EEF-1028-040C-0100-CF3F3A09B77D} /R AOEM /language fr-FR /q
Locked