shortcut deletion problem

Questions about WAPT Server / Requests and help related to the WAPT server
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
davidzfr
Messages: 7
Registration: Nov 26, 2015 - 08:19

December 1, 2015 - 1:27 AM

Hello,

During the package test, the shortcut to SketchUp 2015 is correctly removed by the following setup.py:



from setuphelpers import *

uninstallkey = ["{933E4E07-16F2-4198-A3E3-8C29C9E5D757}"]

def install():
old_sketchup = installed_softwares('Sketchup 2015')
if old_sketchup:
print('Uninstalling SketchUp 2015')
run("MsiExec.exe /x{09F5B1BF-B252-4776-B256-98DFE0730984} /quiet")
remove_file(r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\- EDUCATION -\TECHNOLOGIE\SketchUp 2015.lnk')

print('installing kmr-sketchup2016')
run(r'"SketchUp2016-x64.msi" /q /norestart')



Using the wapt-get build-upload command, we get an IndentationError: unexpected indent.
If we use the shortened Windows name, the error shifts, which seems to indicate a maximum number of characters set to 64.


C:\Users\admin>wapt-get build-upload C:\waptdev\kmr-sketchup2016-wapt
Building C:\waptdev\kmr-sketchup2016-wapt
2015-12-01 10:40:03,072 CRITICAL Error importing C:\waptdev\kmr-sketchup2016-wap
t\setup.py: Traceback (most recent call last):
File "D:\wapt\common.py", line 634, in import_setup
py_mod = imp.load_source(modulename, setupfilename)
File "C:\waptdev\kmr-sketchup2016-wapt\setup.py", line 11
remove_file(r'C:\ProgramData\Microsoft\Windows\Start Menu\Programs\- EDUCATI
ON -\TECHNOLOGY\SketchUp 2015.lnk')
^
IndentationError: unexpected indent

FATAL ERROR: IndentationError: unexpected indent (setup.py, line 11)

Kind regards,
David Rouet
Locked