-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removing admin permission for installing the native client on Windows…
… (thanks to @inbasic comment)
- Loading branch information
1 parent
45be3e3
commit 793bc52
Showing
3 changed files
with
9 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,16 @@ | ||
@echo off | ||
|
||
call :isAdmin | ||
|
||
if %errorlevel% == 0 ( | ||
goto :run | ||
) else ( | ||
echo . | ||
echo . | ||
echo ************ERROR***************** | ||
echo *******Run as administrator******* | ||
echo ********************************** | ||
echo . | ||
echo . | ||
pause | ||
) | ||
|
||
exit /b | ||
|
||
:isAdmin | ||
fsutil dirty query %systemdrive% >nul | ||
exit /b | ||
|
||
:run | ||
|
||
echo .. Writting to Chrome Registry | ||
echo .. Key: HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node | ||
REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%ProgramFiles%\com.add0n.node\manifest-chrome.json" /f | ||
REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%LocalAPPData%\com.add0n.node\manifest-chrome.json" /f | ||
|
||
echo .. Writting to Firefox Registry | ||
echo .. Key: HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node | ||
for %%f in ("%PROGRAMFILES%") do SET SHORT_PATH=%%~sf | ||
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%SHORT_PATH%\com.add0n.node\manifest-firefox.json" /f | ||
echo .. Key: HKCU\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node | ||
for %%f in ("%LocalAPPData%") do SET SHORT_PATH=%%~sf | ||
REG ADD "HKCU\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%SHORT_PATH%\com.add0n.node\manifest-firefox.json" /f | ||
|
||
pushd "%~dp0" | ||
cd app | ||
..\node.exe install.js "%ProgramFiles%" | ||
..\node.exe install.js "%LocalAPPData%" | ||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
793bc52
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,39 +1,16 @@
@echo off
-call :isAdmin
-if %errorlevel% == 0 (
-) else (
-)
-exit /b
-:isAdmin
-fsutil dirty query %systemdrive% >nul
-exit /b
-:run
echo .. Writting to Chrome Registry
echo .. Key: HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node
-REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%ProgramFiles%\com.add0n.node\manifest-chrome.json" /f
+REG ADD "HKCU\Software\Google\Chrome\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%LocalAPPData%\com.add0n.node\manifest-chrome.json" /f
echo .. Writting to Firefox Registry
-echo .. Key: HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node
-for %%f in ("%PROGRAMFILES%") do SET SHORT_PATH=%%~sf
-REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%SHORT_PATH%\com.add0n.node\manifest-firefox.json" /f
+echo .. Key: HKCU\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node
+for %%f in ("%LocalAPPData%") do SET SHORT_PATH=%%~sf
+REG ADD "HKCU\SOFTWARE\Mozilla\NativeMessagingHosts\com.add0n.node" /ve /t REG_SZ /d "%SHORT_PATH%\com.add0n.node\manifest-firefox.json" /f
pushd "%~dp0"
cd app
-..\node.exe install.js "%ProgramFiles%"
+..\node.exe install.js "%LocalAPPData%"
pause