polserver/install_git_hooks_WIN.vbs
frozenblit 5a97b8d3aa Added versioned git hooks support. (Windows)
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".
2014-08-25 01:21:57 +02:00

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