mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
The script "install_git_hooks_WIN.vbs" will request admin privileges and create a symbolic link to "git_hooks" in the ".git/hooks" folder. Git hooks can be added to the repository in the folder "git_hooks".
11 lines
No EOL
501 B
Text
11 lines
No EOL
501 B
Text
' This script is used to request admin privileges from the user before
|
|
' running hook_helper.bat. This is because Windows requires admin privileges
|
|
' for creating symbolic links and batch files can't escalate their own
|
|
' permissions.
|
|
|
|
set shellObj = CreateObject("Shell.Application")
|
|
set fso = CreateObject("Scripting.FileSystemObject")
|
|
dim currentFolder
|
|
currentFolder = fso.GetAbsolutePathName(".")
|
|
|
|
shellObj.ShellExecute "cmd", "/C cd /d """ & currentFolder & """ && hook_helper.bat", "", "runas", 1 |