Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

setup_web.cmd 1.7 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
  1. @echo on
  2. cd /d "%~dp0"
  3. if "%EMULATED%"=="true" if DEFINED APPCMD goto emulator_setup
  4. if "%EMULATED%"== "true" exit /b 0
  5. echo Granting permissions for Network Service to the web root directory...
  6. icacls ..\ /grant "Network Service":(OI)(CI)W
  7. if %ERRORLEVEL% neq 0 goto error
  8. echo OK
  9. echo Configuring powershell permissions
  10. powershell -c "set-executionpolicy unrestricted"
  11. echo Downloading and installing runtime components
  12. powershell .\download.ps1 '%RUNTIMEURL%' '%RUNTIMEURLOVERRIDE%'
  13. if %ERRORLEVEL% neq 0 goto error
  14. echo SUCCESS
  15. exit /b 0
  16. :error
  17. echo FAILED
  18. exit /b -1
  19. :emulator_setup
  20. echo Running in emulator adding iisnode to application host config
  21. FOR /F "tokens=1,2 delims=/" %%a in ("%APPCMD%") DO set FN=%%a&set OPN=%%b
  22. if "%OPN%"=="%OPN:apphostconfig:=%" (
  23. echo "Could not parse appcmd '%appcmd% for configuration file, exiting"
  24. goto error
  25. )
  26. set IISNODE_BINARY_DIRECTORY=%programfiles(x86)%\iisnode-dev\release\x64
  27. set IISNODE_SCHEMA=%programfiles(x86)%\iisnode-dev\release\x64\iisnode_schema.xml
  28. if "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto start
  29. set IISNODE_BINARY_DIRECTORY=%programfiles%\iisnode-dev\release\x86
  30. set IISNODE_SCHEMA=%programfiles%\iisnode-dev\release\x86\iisnode_schema_x86.xml
  31. :start
  32. set
  33. echo Using iisnode binaries location '%IISNODE_BINARY_DIRECTORY%'
  34. echo installing iisnode module using AppCMD alias %appcmd%
  35. %appcmd% install module /name:"iisnode" /image:"%IISNODE_BINARY_DIRECTORY%\iisnode.dll"
  36. set apphostconfigfile=%OPN:apphostconfig:=%
  37. powershell -c "set-executionpolicy unrestricted"
  38. powershell .\ChangeConfig.ps1 %apphostconfigfile%
  39. if %ERRORLEVEL% neq 0 goto error
  40. copy /y "%IISNODE_SCHEMA%" "%programfiles%\IIS Express\config\schema\iisnode_schema.xml"
  41. if %ERRORLEVEL% neq 0 goto error
  42. exit /b 0
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...