gucci-on-fleek / lockdown-browser

Run the ”Respondus Lockdown Browser“ in the ”Windows Sandbox“
Other
122 stars 23 forks source link

can not build #16

Open NoString opened 1 year ago

NoString commented 1 year ago
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Windows\system32> cd C:\Users\zhs\Desktop\lockdown-browser
PS C:\Users\zhs\Desktop\lockdown-browser> .\build.ps1
WARNING: The setup configuration provider is not registered. Assuming no registered instances.
Cannot index into a null array.
At C:\Users\zhs\Desktop\lockdown-browser\build.ps1:14 char:5
     pushd (Get-VSSetupInstance)[0].InstallationPath
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    CategoryInfo          : InvalidOperation: (:) [], ParentContainsErrorRecordException
     FullyQualifiedErrorId : NullArray

I used PowerShell by Administrator, and I had put the install package of lockdown browser in runtime_directory

gucci-on-fleek commented 1 year ago

Did you install the Visual Studio C++ Tools first? That error message suggests that the compiler isn't correctly installed.

NoString commented 1 year ago
The system cannot find the file specified.
Submodule 'Detours' (https://github.com/microsoft/Detours.git) registered for path 'Detours'
Cloning into 'C:/Users/zhs/Desktop/lockdown-browser/Detours'...
Submodule path 'Detours': checked out '734ac64899c44933151c1335f6ef54a590219221'

Microsoft (R) Program Maintenance Utility Version 14.36.32532.0
Copyright (C) Microsoft Corporation.  All rights reserved.

 Created ..\include
 Created ..\lib.X86
 Created ..\bin.X86
 Created obj.X86
        cl /nologo /W4 /WX /we4777 /we4800 /Zi /MT /Gy /Gm- /Zl /Od /DDETOUR_DEBUG=0 /DWIN32_LEAN_AND_MEAN /D_WIN32_WINNT=0x501 /Fd..\lib.X86\detours.pdb /Foobj.X86\ /c detours.cpp modules.cpp disasm.cpp image.cpp creatwth.cpp disolx86.cpp disolx64.cpp disolia64.cpp disolarm.cpp disolarm64.cpp
detours.cpp
C:\Users\zhs\Desktop\lockdown-browser\Detours\src\detours.h(40): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
modules.cpp
C:\Users\zhs\Desktop\lockdown-browser\Detours\src\detours.h(40): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
disasm.cpp
C:\Users\zhs\Desktop\lockdown-browser\Detours\src\detours.h(40): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
image.cpp
C:\Users\zhs\Desktop\lockdown-browser\Detours\src\detours.h(40): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
creatwth.cpp
C:\Users\zhs\Desktop\lockdown-browser\Detours\src\detours.h(40): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
disolx86.cpp
C:\Users\zhs\Desktop\lockdown-browser\Detours\src\detours.h(40): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
disolx64.cpp
C:\Users\zhs\Desktop\lockdown-browser\Detours\src\detours.h(40): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
disolia64.cpp
C:\Users\zhs\Desktop\lockdown-browser\Detours\src\detours.h(40): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
disolarm.cpp
C:\Users\zhs\Desktop\lockdown-browser\Detours\src\detours.h(40): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
disolarm64.cpp
C:\Users\zhs\Desktop\lockdown-browser\Detours\src\detours.h(40): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
Generating Code...
NMAKE : fatal error U1077: 'cl /nologo /W4 /WX /we4777 /we4800 /Zi /MT /Gy /Gm- /Zl /Od /DDETOUR_DEBUG=0 /DWIN32_LEAN_AND_MEAN /D_WIN32_WINNT=0x501 /Fd..\lib.X86\detours.pdb /Foobj.X86\ /c detours.cpp modules.cpp disasm.cpp image.cpp creatwth.cpp disolx86.cpp disolx64.cpp disolia64.cpp disolarm.cpp disolarm64.cpp ' : return code '0x2'
Stop.

Microsoft (R) Program Maintenance Utility Version 14.36.32532.0
Copyright (C) Microsoft Corporation.  All rights reserved.

 Created obj.X86
        copy syelog.h ..\..\include\syelog.h
        1 file(s) copied.
        cl /nologo /Zi /MT /Gm- /W4 /WX /we4777 /we4800 /Od /DDETOUR_DEBUG=0 /I..\..\include /Fdobj.X86\vc.pdb /Foobj.X86\ /c syelog.cpp
syelog.cpp
syelog.cpp(9): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
NMAKE : fatal error U1077: 'cl /nologo /Zi /MT /Gm- /W4 /WX /we4777 /we4800 /Od /DDETOUR_DEBUG=0 /I..\..\include /Fdobj.X86\vc.pdb /Foobj.X86\ /c syelog.cpp ' : return code '0x2'
Stop.

Microsoft (R) Program Maintenance Utility Version 14.36.32532.0
Copyright (C) Microsoft Corporation.  All rights reserved.

 Created obj.X86
NMAKE : fatal error U1073: don't know how to make '..\..\lib.X86\syelog.lib'
Stop.

    Directory: C:\Users\zhs\Desktop\lockdown-browser

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         5/31/2023   2:12 PM                build
Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32532 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

GetSystemMetrics-Hook.cpp
../src/GetSystemMetrics-Hook.cpp(6): fatal error C1083: Cannot open include file: 'windows.h': No such file or directory
cp : Cannot find path 'C:\Users\zhs\Desktop\lockdown-browser\Detours\bin.X86\withdll.exe' because it does not exist.
At C:\Users\zhs\Desktop\lockdown-browser\build.ps1:67 char:5
+     cp ../Detours/bin.X86/withdll.exe . # This is the program that ac ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\zhs\De...X86\withdll.exe:String) [Copy-Item], ItemNotFoundExce
   ption
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

PS C:\Users\zhs\Desktop\lockdown-browser\runtime_directory>

this file is not exist... I try to clone again, but it's also

gucci-on-fleek commented 1 year ago

Hmm, that's odd.

Maybe the Windows SDK isn't installed? You need that in addition to the compilers. Rerun the VS installer and check "Windows SDK Tools" (or something with a similar name).

NoString commented 1 year ago

it's work. but when I follow the step, it can not open the lockdown browser. could you try the version of my school? https://download.respondus.com/lockdown/download.php?id=REDACTED

gucci-on-fleek commented 1 year ago

it's work. but when I follow the step, it can not open the lockdown browser.

Any more details? An exact error message would be best.

could you try the version of my school?

I don't have a computer that runs Windows, so that would be impossible for me.

NoString commented 1 year ago

I take a video, could you check it? https://youtu.be/-YLC3W8S2T4

gucci-on-fleek commented 1 year ago

Hmm, I haven't seen that one before.

Can you try manually launching the Browser:

You get a “Terminal Services” error message

If the Lockdown Browser fails to launch, do not double-click the file on the VM's desktop. Instead, open a PowerShell prompt inside the VM and run:

cd C:\Users\WDAGUtilityAccount\Desktop\runtime_directory\
.\withdll.exe /d:GetSystemMetrics-Hook.dll "C:\Program Files (x86)\Respondus\LockDown Browser\LockDownBrowser.exe"

Of course, this is usually symptomatic of another issue, so please make sure that you have followed all the earlier instructions.

then reply with the output?

NoString commented 1 year ago
PS C:\Users\WDAGUtilityAccount\Desktop\runtime_directory> .\withdll.exe /d:GetSystemMetrics-Hook.dll "C:\Program Files (x86)\Respondus\LockDown Browser\LockDownBrowser.exe"
withdll.exe: Starting: `"C:\Program Files (x86)\Respondus\LockDown Browser\LockDownBrowser.exe"'
withdll.exe:   with `C:\Users\WDAGUtilityAccount\Desktop\runtime_directory\GetSystemMetrics-Hook.dll'
PS C:\Users\WDAGUtilityAccount\Desktop\runtime_directory> .\withdll.exe /d:GetSystemMetrics-Hook.dll "C:\Program Files (x86)\Respondus\LockDown Browser\LockDownBrowser.exe"
withdll.exe: Starting: `"C:\Program Files (x86)\Respondus\LockDown Browser\LockDownBrowser.exe"'
withdll.exe:   with `C:\Users\WDAGUtilityAccount\Desktop\runtime_directory\GetSystemMetrics-Hook.dll'
PS C:\Users\WDAGUtilityAccount\Desktop\runtime_directory>

I ran this command, but it also like the video. started. but do not open the browser

gucci-on-fleek commented 1 year ago
withdll.exe: DetourCreateProcessWithDllEx failed: 740

(from the original version, before the edit)

Error code 740 means ERROR_ELEVATION_REQUIRED. This suggests that some UAC weirdness is going on.

Some ideas:

1) Rerun that same .\withdll.exe … command from an Administrator Powershell window. To open an Admin shell, right-click on the Start Menu, then pick "Powershell (Admin)". This may not be there though—I seem to remember that you're always Admin inside the sandbox.

2) Try running

```powershell
cd C:\Users\WDAGUtilityAccount\Desktop\runtime_directory\
__COMPAT_LAYER=RUNASINVOKER .\withdll.exe /d:GetSystemMetrics-Hook.dll "C:\Program Files (x86)\Respondus\LockDown Browser\LockDownBrowser.exe"
```

3) Redownload a fresh copy of the Browser from your school/Respondus, and try using that. All these weird errors makes me think that the Browser is trying to update itself.

NoString commented 1 year ago
PS C:\Users\WDAGUtilityAccount\Desktop\runtime_directory> .\withdll.exe /d:GetSystemMetrics-Hook.dll "C:\Program Files (x86)\Respondus\LockDown Browser\LockDownBrowser.exe"
withdll.exe: Starting: `"C:\Program Files (x86)\Respondus\LockDown Browser\LockDownBrowser.exe"'
withdll.exe:   with `C:\Users\WDAGUtilityAccount\Desktop\runtime_directory\GetSystemMetrics-Hook.dll'
PS C:\Users\WDAGUtilityAccount\Desktop\runtime_directory> .\withdll.exe /d:GetSystemMetrics-Hook.dll "C:\Program Files (x86)\Respondus\LockDown Browser\LockDownBrowser.exe"
withdll.exe: Starting: `"C:\Program Files (x86)\Respondus\LockDown Browser\LockDownBrowser.exe"'
withdll.exe:   with `C:\Users\WDAGUtilityAccount\Desktop\runtime_directory\GetSystemMetrics-Hook.dll'
PS C:\Users\WDAGUtilityAccount\Desktop\runtime_directory>

I ran this command, but it also like the video. started. but do not open the browser

Gregory67160 commented 1 year ago

I also ran into the "terminal services" issue when running (along with the DLL and exe not being in the runtime directory). I did a fresh clone and build and it worked fine, so maybe just try it again?