→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
soucyinter
Engaged Sweeper III
Hello,

I'm trying to create a deployment package with multiple steps.
Each steps have been tested seperately and they all worked.

Whenever I try to join all steps into one package, it fails.
Here's the complete script :
Result: Deployment ended: Incorrect function. Stop(Failure). Credential: (xxxx\xxxx). ShareCredential: (xxxx\xxxx).
Command:
taskkill /im seviewer.exe /f
timeout /t 5
start /wait wmic product where "name like 'Solid Edge Viewer ST%%'" call uninstall /nointeractive
timeout /t 5
start /wait msiexec.exe /i \\my_server\DefaultPackageShare$\Installers\SolidEdgeViewerST8\MSI_Setup_Viewer_ST8\SolidEdgeViewerST8.msi /qn /passive
timeout /t 5
xcopy "\\my_server\DefaultPackageShare$\Installers\SolidEdgeViewerST8\MSI_Setup_Viewer_ST8_MP\*" "%temp%\MSI_Setup_Viewer_ST8_MP\" /s /e /y
start /wait msiexec /p %temp%\MSI_Setup_Viewer_ST8_MP\\Solid Edge Viewer ST8.msp" /qb


Elseway, I've also tried to use multiple steps instead of a command consisting of all the commands into one.

Here's my steps :
1. Check if v. 5 installed - Success : Step 4 | Failure : Next (Step 2)
2. Check if v. 6 installed - Success : Step 4 | Failure : Next (Step 3)
3. Check if v. 7 installed - Success : Step 4 | Failure : Step 5
4. Uninstall software - Success : Step 5 | Failure : Stop (Failure)
5. Install most-recent version of the software - Success : Step 6 | Failure : Stop (Failure)
6. Copy update files to %temp% folder - Success : Step 7 | Failure : Stop (Failure)
7. Install update - Success : Stop (Sucess) | Failure : Stop (Failure)

Steps 1, 2, 3 = Condition
Step 4 = MsiUninstaller / Command (start /wait product xxxx call uninstall)
Step 5 = Command (start /wait msiexec.exe /i {Package}\xxxx.msi /qn
Step 6 = Command (xcopy %source% %destination% /s /e /y)
Step 7 = Command (start /wait msiexec /p "path\file.msp" /qb

Last thing I tried... calling a .bat - Which doesn't work either.

Is there something with the /wait parameter in the start command which Lansweeper doesn't like?
It seems like to package installation never gets out of the first /wait command and so it doesn't move to the next steps.

Please help me understand the problem , I've tried many things and always get close to make it all work but it never gets to the end of the installation.
Sad thing is it would work in a .bat file but can't be execute (called) from Lansweeper package installation.

Thank you in advance!
1 ACCEPTED SOLUTION
soucyinter
Engaged Sweeper III
I have found the solution to bypass Windows 10 administrative priviledge parameters.
By default, users (even if local administrator) get their admin identification removed on some types of installations.

The workaround is to modify the registry key "LocalAccountTokenFilterPolicy".
By default it doesn't exist in the registry but its value is set to "0".

You need to create a DWORD key "LocalAccountTokenFilterPolicy" with a value "1" in the following path :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\

This key set to 1 creates token with elevated priviledges on all installations. No need to right-click and choose "Run as administrator..."
Remote installations can't use the "Run as administrator" unfortunately, there's no command to do it as far as I know (maybe the excecutable ShellRunAs.exe but I ain't sure).

So there you go if you guys need to remote install a software that won't install because of admin priviledges being requested.

Good day!

View solution in original post

2 REPLIES 2
soucyinter
Engaged Sweeper III
I have found the solution to bypass Windows 10 administrative priviledge parameters.
By default, users (even if local administrator) get their admin identification removed on some types of installations.

The workaround is to modify the registry key "LocalAccountTokenFilterPolicy".
By default it doesn't exist in the registry but its value is set to "0".

You need to create a DWORD key "LocalAccountTokenFilterPolicy" with a value "1" in the following path :
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\

This key set to 1 creates token with elevated priviledges on all installations. No need to right-click and choose "Run as administrator..."
Remote installations can't use the "Run as administrator" unfortunately, there's no command to do it as far as I know (maybe the excecutable ShellRunAs.exe but I ain't sure).

So there you go if you guys need to remote install a software that won't install because of admin priviledges being requested.

Good day!
soucyinter
Engaged Sweeper III
Hmm,

I just found out that in the %temp% folder of Windows, a file was created (MSIxxxx.txt) telling me the user must be an administrator.
The fact is, I am running the script from a domain user session with Administrator priviledges on that machine.
I must add that the OS is Windows 10..... seems like there's a lot of restrictions with this new OS.

Is there a way to start a msiexec cmd and bypass that Administrator requirement even though the user has the rights?

I kmow we can do it by calling a .bat shortcut which we can tell the shortcut to always run as administrator mode, but in command lines... hmmmpf!!

Any ideas?