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