Commit efc8bc56 authored by rocosen's avatar rocosen

feat:demo

parent 16dc25ca
......@@ -4,7 +4,7 @@
".prettierrc": "jsonc",
".eslintignore": "ignore"
},
"eslint.validate": [
"javascript",
"javascriptreact",
......@@ -15,7 +15,6 @@
"javascript.validate.enable": false,
"javascript.format.enable": false,
"typescript.format.enable": false,
"search.exclude": {
".git": true,
".eslintcache": true,
......
powershell -Command "ECHO N | powershell Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol"
powershell -Command "ECHO N | powershell Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Client"
powershell -Command "ECHO N | powershell Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Server"
powershell -Command "ECHO N | powershell Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol-Deprecation"
sc config LanmanServer start= disabled
powershell -Command "echo N | net stop LanmanServer"
sc config iphlpsvc start= auto
echo 127.0.0.1 aliyun 127.0.0.1 baiduyun 127.0.0.1 aws 127.0.0.1 tencent 127.0.0.1 google 127.0.0.1 huawei >> C:\Windows\System32\drivers\etc\hosts
powershell -Command "netsh interface portproxy add v4tov4 listenport=445 listenaddress=aliyun connectaddress=47.93.217.126 connectport=4555"
powershell -Command "netsh interface portproxy add v4tov4 listenport=445 listenaddress=baiduyun connectaddress=180.76.134.227 connectport=4555"
@echo off
powershell -Command "net use O: \\aliyun\data\1b520eb8a56147299ad803f9f87b6297 123456 /user:cloudam /persistent:yes"
powershell -Command "net use P: \\baiduyun\data\1b520eb8a56147299ad803f9f87b6297 123456 /user:cloudam /persistent:yes"
powershell -Command "net use * /y /del"
md C:\test
mklink /D C:\test\aliyun \\aliyun\ali\1b520eb8a56147299ad803f9f87b6297
mklink /D C:\test\baiduyun \\baiduyun\data\1b520eb8a56147299ad803f9f87b6297
subst Z: C:\test
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
C:
cd C:\Users\Default\AppData
md ttt.txt
This diff was suppressed by a .gitattributes entry.
chcp 65001
sc config LanmanServer start= disabled
echo N | net stop LanmanServer
sc config iphlpsvc start= auto
start "" /w /B "%cd%\resources\assets\exe\devcon.exe" /install %windir%\inf\netloop.inf *msloop
powershell -Command "$interfaces = Get-WmiObject Win32_NetworkAdapter;$interfaces | foreach {$friendlyname = $_ | Select-Object -ExpandProperty NetConnectionID;$name = $_ | Select-Object -ExpandProperty Name;$friendlyname | Out-File -Encoding utf8 aa.txt;}
set /p netname=<aa.txt
echo %netname%
netsh interface ip add address "%netname%" 1.10.0.1 255.255.255.0
netsh interface ip add address "%netname%" 1.10.1.1 255.255.255.0
netsh interface portproxy add v4tov4 listenport=445 listenaddress=1.10.0.1 connectaddress=47.93.217.126 connectport=4555
netsh interface portproxy add v4tov4 listenport=445 listenaddress=1.10.1.1 connectaddress=180.76.134.227 connectport=4555
md C:\test
mklink /D c:\test\aliyun \\1.10.0.1\ali\1b520eb8a56147299ad803f9f87b6297
mklink /D c:\test\baiduyun \\1.10.1.1\data\1b520eb8a56147299ad803f9f87b6297
\ No newline at end of file
@echo off
net use \\1.10.0.1\ali\1b520eb8a56147299ad803f9f87b6297 123456 /user:cloudam /persistent:yes
net use \\1.10.1.1\data\1b520eb8a56147299ad803f9f87b6297 123456 /user:cloudam /persistent:yes
subst Z: C:\test
\ No newline at end of file
currentpath = createobject("Scripting.FileSystemObject").GetFolder(".").Path
path = Chr(34) & currentpath & "\mount.bat" & Chr(34)
Set shell=CreateObject("WScript.Shell")
a = shell.run (path,0)
Set wshell = Nothing
......@@ -26,7 +26,7 @@ FunctionEnd
!macroend
!macro customInstall
nsExec::Exec "$INSTDIR\resources\assets\bat\init.bat"
nsExec::Exec "$INSTDIR\resources\assets\script\init.bat"
!macroend
!macro customUnInstall
......
{
"name": "bkunyun",
"version": "0.0.0",
"version": "0.0.1",
"description": "北鲲云盘",
"license": "MIT",
"author": {
......
......@@ -4,10 +4,12 @@ import './App.css';
import path from 'path';
import { Button } from '@mui/material';
const rootPath = require('electron-root-path').rootPath;
const { shell } = require('electron')
const location = path.join(rootPath.substring(0, rootPath.length - 8), './assets/bat/mount.bat');
const { shell } = require('electron');
const location = path.join(
rootPath.substring(0, rootPath.length - 8),
'./assets/script/start.vbs'
);
const Hello = () => {
return (
<div>
<div className="Hello">
......@@ -15,20 +17,14 @@ const Hello = () => {
</div>
<h1>electron-react</h1>
<div className="Hello">
<Button variant="contained" onClick={()=>{
shell.openPath(location);
}} >
挂载
</Button>
{/* <button type="button" >
<span role="img" aria-label="books">
🙏
</span>
挂载
</button> */}
<Button
variant="contained"
onClick={() => {
shell.openPath(location);
}}
>
挂载
</Button>
</div>
</div>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment