authority nt\system
https://ibb.co/iwCjWp (I do not know why the image does not appear being in the [img] tag)
So in that cmd.exe you are "Local System" (it is the real root account on Windows). Now you just need to run the same command line that you have put in yourempbilly a écrit : ↑27 sept. 2018 - 17:12 I did the tests and when I run a cmd via psexec it is as shown in the image below.
authority nt\system
https://ibb.co/iwCjWp (I do not know why the image does not appear being in the [img] tag)
Code : Tout sélectionner
setup.py
Code : Tout sélectionner
C:\ProgramData\{5F3A4BBA-1519-45F2-9BF7-1E9924E32CAA}>"Surfer(11.1.719)_Installer.exe" REMOVE=TRUE MODIFY=FALSE UNINSTALL=TRUE /s
Only after I press OK does the uninstall continue.C:\Windows\system32\config\systemprofile\Desktop refers to an unavailable location. It may be on a hard drive on these computers or on a network. Make sure the disk is inserted correctly or you are connected to the internet or the network and try again. If it still can not be found, the information may have been moved to another location.
How about you create an empty folder C:\Windows\system32\config\systemprofile\Desktop in your install script ?empbilly a écrit : ↑27 sept. 2018 - 21:18C:\Windows\system32\config\systemprofile\Desktop refers to an unavailable location. It may be on a hard drive on these computers or on a network. Make sure the disk is inserted correctly or you are connected to the internet or the network and try again. If it still can not be found, the information may have been moved to another location.
Like Vincent said previously, creating the C:\Windows\system32\config\systemprofile\Desktop folder before hand will probably do the trick. The uninstall script probably tries to remove an icon it had copied during installation to do some cleanup, but it fails miserably because the "Local System" user does not have such a folder (C:\Windows\system32\config\systemprofile\ is the value of %USERPROFILE% for "Local System"). And it explains why it was working when doing it in a user context.empbilly a écrit : ↑27 sept. 2018 - 21:18 I got in touch with the company that developed the software and was given another variable to silently remove.
When executing this command in cmd via psexec.exe another window is showing that they do not find a file or folder.Code : Tout sélectionner
C:\ProgramData\{5F3A4BBA-1519-45F2-9BF7-1E9924E32CAA}>"Surfer(11.1.719)_Installer.exe" REMOVE=TRUE MODIFY=FALSE UNINSTALL=TRUE /s
The window tells the message below:Only after I press OK does the uninstall continue.C:\Windows\system32\config\systemprofile\Desktop refers to an unavailable location. It may be on a hard drive on these computers or on a network. Make sure the disk is inserted correctly or you are connected to the internet or the network and try again. If it still can not be found, the information may have been moved to another location.
The path C:\Windows\system32\config\systemprofile exists, but "Desktop" no.
Would there be any way to simulate OK click?
Code : Tout sélectionner
psexec -i -s cmd.exe
Code : Tout sélectionner
# -*- coding: utf-8 -*-
from setuphelpers import *
import os
uninstallkey = []
destdir = makepath(programfiles, "Golden Software", "Surfer 11")
exefile = "Surfer.exe"
inidir = "%s\\AppData\\Gradient.ini" % destdir
pstools = makepath(programfiles, "mspstools")
error_env = os.environ['WINDIR']
error_path = r'%s\system32\config\systemprofile\Desktop' % error_env
def install():
if not os.path.isdir(error_path):
os.makedirs(error_path)
if os.path.exists(error_path):
print("%s was success created!" % error_path)
print('Uninstalling old versions of surfer...')
for soft in installed_softwares("Surfer"):
try:
cmd = WAPT.uninstall_cmd(soft['key'])
if isinstance(cmd,list) and len(cmd) == 1:
cmd = cmd[0]
if destdir and not 'UNINSTALL=YES' in cmd:
cmd = cmd + ' UNINSTALL=YES' + ' /s'
run(cmd)
else:
if not destdir and 'UNINSTALL=YES' in cmd:
run(cmd)
except ValueError:
pass
print('Uninstalling old versions of Surfer completed!')
print('Installing Surfer...')
install_msi_if_needed('surfer.msi')
if os.path.exists(destdir):
filecopyto("Gradient.ini", "%s\\AppData" % destdir)
if os.path.exists(inidir):
print("Gradient.ini copied to the folder %s\\AppData" % destdir)