|
收到,明白了,原来跟10.5没有太大区别。
- @echo off
- cd /d "%~dp0"
- %1 start "" mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c ""%~s0"" ::","","runas",1)(window.close)&&exit
- cd /d "%~dp0"
- if not exist %ProgramData%\Oray\SunloginClient\config.ini md %ProgramData%\Oray\SunloginClient
- copy /y config.ini %ProgramData%\Oray\SunloginClient
- reg add HKCU\SOFTWARE\Oray\SunLogin\SunloginClient /v 10.5.0.29613_IsRunSeted /t REG_SZ /d "1" /f
- ::regedit /s SunloginClient_10.5.0.29613_autorun.reg
- start SunloginClient_10.5.0.29613.exe
- ::--cmd=autorun
- :_CreateShortcut
- ::设置程序或文件的完整路径(必选)
- set Program=D:\Portable.App\Remote_AnyDesk_SunLogin\SunLogin\SunloginClient_10.5.0.29613.exe
- ::设置快捷方式名称(必选)
- set LnkName=远程控制-向日葵SunloginClient_10.5.0.29613
- ::设置程序的工作路径,一般为程序主目录,此项若留空,脚本将自行分析路径
- set WorkDir=
- ::设置快捷方式显示的说明(可选)
- set Desc=远程控制-向日葵SunloginClient_10.5.0.29613
- if not defined WorkDir call:GetWorkDir "%Program%"
- (echo Set WshShell=CreateObject("WScript.Shell"^)
- echo strDesKtop=WshShell.SPEcialFolders("DesKtop"^)
- echo Set oShellLink=WshShell.CreateShortcut(strDesKtop^&"\%LnkName%.lnk"^)
- echo oShellLink.TargetPath="%Program%"
- echo oShellLink.WorkingDirectory="%WorkDir%"
- echo oShellLink.Windowstyle=1
- echo oShellLink.Description="%Desc%"
- echo oShellLink.Save)>makelnk.vbs
- echo 桌面快捷方式创建成功!
- makelnk.vbs
- del /f /q makelnk.vbs
复制代码 |
|