Commit b36b2a29 authored by rocosen's avatar rocosen

“bat”

parent ff8dac63
22
\ No newline at end of file
%1 mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
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
powershell -Command "echo "`n127.0.0.1 aliyun" >> C:\Windows\System32\drivers\etc\hosts"
powershell -Command "echo "`n127.0.0.1 baiduyun" >> C:\Windows\System32\drivers\etc\hosts"
powershell -Command "echo "`n127.0.0.1 aws" >> C:\Windows\System32\drivers\etc\hosts"
powershell -Command "echo "`n127.0.0.1 tencent" >> C:\Windows\System32\drivers\etc\hosts"
powershell -Command "echo "`n127.0.0.1 google" >> C:\Windows\System32\drivers\etc\hosts"
powershell -Command "echo "`n127.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
subst Z: C:\test
Z:
mklink /D aliyun \\aliyun\ali\1b520eb8a56147299ad803f9f87b6297
mklink /D baiduyun \\baiduyun\data\1b520eb8a56147299ad803f9f87b6297
\ No newline at end of file
!include nsDialogs.nsh
XPStyle on
Var Dialog
Page custom myCustomPage
Function myCustomPage
Pop $Dialog
${If} $Dialog == error
Abort
${EndIf}
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_TEXT "开机自动启动"
SetRebootFlag true
IfRebootFlag 0 +2
FunctionEnd
!macro preInit
SetRegView 64
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\test-e"
......
......@@ -7,23 +7,15 @@ Var Dialog
Page custom myCustomPage
Function myCustomPage
Pop $Dialog
${If} $Dialog == error
Abort
${EndIf}
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_TEXT "开机自动启动"
SetRebootFlag true
IfRebootFlag 0 +2
FunctionEnd
!macro preInit
SetRegView 64
WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\Program Files\test-e"
......@@ -34,7 +26,7 @@ FunctionEnd
!macroend
!macro customInstall
nsExec::Exec "D:\ooo.bat"
nsExec::Exec "$INSTDIR\resources\assets\bat\init.bat"
!macroend
!macro customUnInstall
......
......@@ -110,6 +110,7 @@
"dependencies": {
"electron-debug": "^3.2.0",
"electron-log": "^4.4.8",
"electron-root-path": "^1.1.0",
"electron-updater": "^5.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
......@@ -183,8 +184,8 @@
"webpack-merge": "^5.8.0"
},
"build": {
"productName": "ElectronReact",
"appId": "org.erb.ElectronReact",
"productName": "bkunyun",
"appId": "org.erb.bkunyun",
"asar": true,
"asarUnpack": "**\\*.{node,dll}",
"files": [
......@@ -222,8 +223,8 @@
]
},
"nsis": {
"include": "build/eee.nsh",
"oneClick":false,
"include": "build/installer.nsh",
"oneClick": false,
"perMachine": true,
"allowElevation": true,
"allowToChangeInstallationDirectory": true,
......@@ -269,4 +270,4 @@
],
"logLevel": "quiet"
}
}
\ No newline at end of file
}
{
"name": "electron-react-boilerplate",
"version": "4.6.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "electron-react-boilerplate",
"version": "4.6.0",
"hasInstallScript": true,
"license": "MIT"
}
}
"lockfileVersion": 1
}
{
"name": "electron-react-boilerplate",
"version": "4.6.0",
"description": "A foundation for scalable desktop apps",
"name": "bkunyun",
"version": "0.0.0",
"description": "北鲲云盘",
"license": "MIT",
"author": {
"name": "Electron React Boilerplate Maintainers",
......@@ -14,5 +14,7 @@
"postinstall": "npm run electron-rebuild && npm run link-modules",
"link-modules": "node -r ts-node/register ../../.erb/scripts/link-modules.ts"
},
"dependencies": {}
"dependencies": {
"install": "^0.13.0"
}
}
import { MemoryRouter as Router, Routes, Route } from 'react-router-dom';
import icon from '../../assets/icon.svg';
import './App.css';
import path from 'path';
import { rootPath } from 'electron-root-path';
const { shell } = require('electron')
const location = path.join(rootPath.substring(0, rootPath.length - 8), './assets/bat/mount.bat');
const Hello = () => {
return (
<div>
<div className="Hello">
......@@ -25,7 +27,7 @@ const Hello = () => {
</button>
</a>
<button type="button" onClick={()=>{
shell.openPath("D:\iii.bat");
shell.openPath(location);
}} >
<span role="img" aria-label="books">
🙏
......
import { createRoot } from 'react-dom/client';
import App from './App';
import App from './App.jsx';
const container = document.getElementById('root')!;
const root = createRoot(container);
......
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