Skip to content

Commit

Permalink
add register bat file into output dir, for the convenience of registe…
Browse files Browse the repository at this point in the history
…ring.
  • Loading branch information
AqeeAqee committed Feb 28, 2019
1 parent 231d4fe commit 0d73a77
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ArduLoader/ArduboyUploader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="Register associations.cmd">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
Expand Down
16 changes: 16 additions & 0 deletions src/ArduLoader/Register associations.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@echo off
goto check_Permissions

:check_Permissions
echo Checking user rights...

net session >nul 2>&1
if %errorLevel% == 0 (
echo Success. Complete the association answering the message boxes.
%~dp0\abupload.exe -register
echo All done.
) else (
echo Failure: Run the script again as administrator.
)

pause >nul

0 comments on commit 0d73a77

Please sign in to comment.