Open ghost opened 7 years ago
Excellent, worked like a charm, thanks you very much dude !!!
I use below code for RegisterToGAC.bat. It will acquire Administrator permissions if necessary, remove old DLLs from GAC and re-register new ones:
@echo off
::-------------------------------------------------------------
:: Check permissions and run as Administrator.
::-------------------------------------------------------------
ATTRIB %windir%\system32 -h | FINDSTR /I "denied" >nul
IF NOT ERRORLEVEL 1 GOTO:ADM
GOTO:EXE
::-------------------------------------------------------------
:ADM
::-------------------------------------------------------------
:: Create temp batch.
SET tb="%TEMP%\%~n0.tmp.bat"
SET tj="%TEMP%\%~n0.tmp.js"
echo @echo off> %tb%
echo %~d0>> %tb%
echo cd "%~p0">> %tb%
echo call "%~nx0" %1 %2 %3 %4 %5 %6 %7 %8 %9>> %tb%
echo del %tj%>> %tb%
:: Delete itself without generating any error message.
echo (goto) 2^>nul ^& del %tb%>> %tb%
:: Create temp script.
echo var arg = WScript.Arguments;> %tj%
echo var wsh = WScript.CreateObject("WScript.Shell");>> %tj%
echo var sha = WScript.CreateObject("Shell.Application");>> %tj%
echo sha.ShellExecute(arg(0), "", wsh.CurrentDirectory, "runas", 1);>> %tj%
:: Execute as Administrator.
cscript /B /NoLogo %tj% %tb%
GOTO:EOF
::-------------------------------------------------------------
:EXE
::-------------------------------------------------------------
CALL:GAC ComponentFactory.Krypton.Design
CALL:GAC ComponentFactory.Krypton.Toolkit
CALL:GAC ComponentFactory.Krypton.Docking
CALL:GAC ComponentFactory.Krypton.Navigator
CALL:GAC ComponentFactory.Krypton.Ribbon
CALL:GAC ComponentFactory.Krypton.Workspace
pause
GOTO:EOF
:GAC
:: Gacutil.exe (Global Assembly Cache Tool)
:: c:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\
.\gacutil.exe -uf "%1"
.\gacutil.exe -i "%1.dll"
.\gacutil.exe /l "%1"
GOTO:EOF
Excellent, worked like a charm, thanks you.
did not work with me. any advice ?
Hi, I thought i would write this to help people install and use the Krypton Suite within Visual Studio 2013 and Later.
Download Krypton Suite https://github.com/ComponentFactory/Krypton/tree/2013
Unzip to a location on your HDD. Navigate to the "Bin" folder and create a new folder "controls VS 2013". copy all 6 Krypton dll files to the new folder, Note: Only copy DLL's from Bin Folder.
Krypton.Design.dll Krypton.Docking.dll Krypton.Navigator.dll Krypton.Ribbon.dll Krypton.Toolkit.dll Krypton.Workspace.dll
Create a new folder in programs folder - C:\Program Files (x86)\Component Factory\Krypton Toolkit 4.5.0\Bin
Copy the dll folder you created earlier into the "Bin" folder, C:\Program Files (x86)\Component Factory\Krypton Toolkit 4.5.0\Bin\controls VS 2013\
goto: Start >> All Programs >> Visual Studio 2013 >> Visual Studio Tools right click "Developer Command Prompt for VS2013" run as Administrator.
change directory as follows (note: edit the SDK version folder to what you have installed, this example uses " \v8.1A\ "as seen below.)
paste in command window cd C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\
Paste the following one at a time then press enter. This will register the components in the Assembly Folder. You will be notified the assembly has been successfully installed.
gacutil.exe -i "C:\Program Files (x86)\Component Factory\Krypton Toolkit 4.5.0\Bin\controls VS 2013\ComponentFactory.Krypton.Design.dll" gacutil.exe -i "C:\Program Files (x86)\Component Factory\Krypton Toolkit 4.5.0\Bin\controls VS 2013\ComponentFactory.Krypton.Docking.dll" gacutil.exe -i "C:\Program Files (x86)\Component Factory\Krypton Toolkit 4.5.0\Bin\controls VS 2013\ComponentFactory.Krypton.Navigator.dll" gacutil.exe -i "C:\Program Files (x86)\Component Factory\Krypton Toolkit 4.5.0\Bin\controls VS 2013\ComponentFactory.Krypton.Ribbon.dll" gacutil.exe -i "C:\Program Files (x86)\Component Factory\Krypton Toolkit 4.5.0\Bin\controls VS 2013\ComponentFactory.Krypton.Toolkit.dll" gacutil.exe -i "C:\Program Files (x86)\Component Factory\Krypton Toolkit 4.5.0\Bin\controls VS 2013\ComponentFactory.Krypton.Workspace.dll"
Once installed, Reboot computer.
Open Visual Studio 2013 or later in Administrator mode. a. Create a new Windows Form Project. b. add new tab in ToolBox menu > Krypton Suite c. right click and select "Choose Items" d. In the Choose Items Dialog box, select .Net Framework Components. Select Browse Button > Navigate to your Folder in the directory you created:
e. select all Krypton dll files, select open to import, Visual Studio will show an error dialog box, select ok, Visual Studio will show another dialog box prompting that the components are installed but they are Hidden in the ToolBox Menu, select ok.
right click your Project and select Properties, select Application > Target Framework, select .Net Framework 4.0 or Higher, click save, then save your Project. Go to ToolBox Menu and now you can use the Krypton Suite Components.
Tested on Visual Studio 2013 and 2015 MSDN Subscriber Versions.
:)