Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AD-Control-Golang
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
陶腾飞
AD-Control-Golang
Commits
16e684ea
Commit
16e684ea
authored
Aug 12, 2020
by
陶腾飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v1.7.0 更新PDF转化工具,优化用户备份
parent
f6c7d58c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
20 deletions
+30
-20
public/env.go
+1
-1
public/msg_deal.go
+5
-2
public/msg_init.go
+5
-4
users/menu.go
+19
-13
No files found.
public/env.go
View file @
16e684ea
...
@@ -8,7 +8,7 @@ const DaemonListen string = ":" + DaemonPort
...
@@ -8,7 +8,7 @@ const DaemonListen string = ":" + DaemonPort
const
ADServerDaemon
string
=
Host_adserver
+
DaemonListen
const
ADServerDaemon
string
=
Host_adserver
+
DaemonListen
const
WxwrokDaemon
string
=
":16823"
const
WxwrokDaemon
string
=
":16823"
const
RandMax
int
=
60
const
RandMax
int
=
60
const
Version
string
=
"1.
6.1
"
const
Version
string
=
"1.
7.0
"
// user //
// user //
...
...
public/msg_deal.go
View file @
16e684ea
...
@@ -197,8 +197,11 @@ func (exec *MJexec)Msg_Deal()interface{}{
...
@@ -197,8 +197,11 @@ func (exec *MJexec)Msg_Deal()interface{}{
}
}
}
}
exec
.
Status
=
Msg_Exec_State_Over
exec
.
Status
=
Msg_Exec_State_Over
case
Msg_Exec_OpenAdminEXE
:
PsExec_sdi
(
exec
.
Computername
,
exec
.
Command
,
exec
.
SessionID
)
exec
.
Status
=
Msg_Exec_State_Over
default
:
default
:
Execcmd_nowait
(
exec
.
Command
)
Execcmd_nowait
(
exec
.
Command
)
}
}
...
...
public/msg_init.go
View file @
16e684ea
...
@@ -79,6 +79,7 @@ const Msg_Exec_RebootWindows string = "rebootWindows"
...
@@ -79,6 +79,7 @@ const Msg_Exec_RebootWindows string = "rebootWindows"
const
Msg_Exec_RebootWindows_cmd
string
=
"shutdown -r -t 15"
const
Msg_Exec_RebootWindows_cmd
string
=
"shutdown -r -t 15"
const
Msg_Exec_InstallSoftware
string
=
"installsoftware"
const
Msg_Exec_InstallSoftware
string
=
"installsoftware"
const
Msg_Exec_HideShowIcon
string
=
"HideShowIcon"
const
Msg_Exec_HideShowIcon
string
=
"HideShowIcon"
const
Msg_Exec_OpenAdminEXE
string
=
"OpenAdmin"
...
@@ -210,11 +211,11 @@ func GJexecInstallSoftware(b bool,s string) interface{}{
...
@@ -210,11 +211,11 @@ func GJexecInstallSoftware(b bool,s string) interface{}{
exec
.
Command
=
s
exec
.
Command
=
s
return
exec
return
exec
}
}
func
GJexecUserCmd
(
s
string
)
interface
{}{
func
GJexecDIYFlag
(
flag
,
command
string
)
MJexec
{
var
exec
MJexec
var
exec
MJexec
exec
.
Init
(
""
)
exec
.
Init
(
flag
)
exec
.
Command
=
s
exec
.
Command
=
command
exec
.
Status
=
Msg_Exec_State_Ack
return
exec
return
exec
}
}
...
...
users/menu.go
View file @
16e684ea
...
@@ -137,7 +137,6 @@ func siEnter_admin(softname string){
...
@@ -137,7 +137,6 @@ func siEnter_admin(softname string){
go
pub
.
Msg
(
"等待弹出安装窗口,请稍等。。"
)
go
pub
.
Msg
(
"等待弹出安装窗口,请稍等。。"
)
ifFile
:=
pub
.
Exist
(
`C:\windows\`
+
softname
)
ifFile
:=
pub
.
Exist
(
`C:\windows\`
+
softname
)
pub
.
SendServer
(
pub
.
GJexecInstallSoftware
(
ifFile
,
softname
))
pub
.
SendServer
(
pub
.
GJexecInstallSoftware
(
ifFile
,
softname
))
}
}
...
@@ -151,20 +150,20 @@ func siEnter_admin(softname string){
...
@@ -151,20 +150,20 @@ func siEnter_admin(softname string){
func
menuInitTools
(
ni
*
walk
.
NotifyIcon
){
func
menuInitTools
(
ni
*
walk
.
NotifyIcon
){
fa
:=
"工具集合"
fa
:=
"工具集合"
sub
:=
[
...
]
string
{
"Excel关键词分割"
,
"备份用户文件"
,
"优雅批量打开网页"
,
"隐藏/显示桌面图标"
,
"更新手机代理程序"
,
"
移动硬盘(胡一波)
"
}
sub
:=
[
...
]
string
{
"Excel关键词分割"
,
"备份用户文件"
,
"优雅批量打开网页"
,
"隐藏/显示桌面图标"
,
"更新手机代理程序"
,
"
PDF转换
"
}
// 建立空菜单
// 建立空菜单
nm
,
err
:=
walk
.
NewMenu
()
nm
,
err
:=
walk
.
NewMenu
()
if
err
!=
nil
{
if
err
!=
nil
{
pub
.
PntError
(
err
)
pub
.
PntError
(
err
)
}
}
lastone
:=
len
(
sub
)
-
1
//
lastone := len(sub)-1
for
i
,
buttonText
:=
range
sub
{
for
i
,
buttonText
:=
range
sub
{
// 过滤按钮
// 过滤按钮
switch
i
{
//
switch i{
case
lastone
:
//
case lastone:
if
!
pub
.
TheUser
(
pub
.
AD_User_huyibo
)
{
continue
}
//
if ! pub.TheUser(pub.AD_User_huyibo) {continue}
}
//
}
// 建立 子按钮
// 建立 子按钮
na
:=
walk
.
NewAction
()
na
:=
walk
.
NewAction
()
...
@@ -185,8 +184,7 @@ func menuInitTools(ni * walk.NotifyIcon){
...
@@ -185,8 +184,7 @@ func menuInitTools(ni * walk.NotifyIcon){
case
4
:
case
4
:
na
.
Triggered
()
.
Attach
(
tUpdateATool
)
na
.
Triggered
()
.
Attach
(
tUpdateATool
)
case
5
:
case
5
:
na
.
Triggered
()
.
Attach
(
tmovedisk_huyibo
)
na
.
Triggered
()
.
Attach
(
tPdfTrans
)
}
}
// 将 子按钮 添加到 菜单
// 将 子按钮 添加到 菜单
...
@@ -274,16 +272,24 @@ func tBakcupUser(){
...
@@ -274,16 +272,24 @@ func tBakcupUser(){
pub
.
SendServerReport
(
pub
.
Msg_Report_InitBak
)
pub
.
SendServerReport
(
pub
.
Msg_Report_InitBak
)
}
}
}
}
// 其他工具 备份用户文件
func
tPdfTrans
(){
AcrobatDC
:=
`C:\Application\AcrobatDC\AcrobatDCPortable.exe`
if
pub
.
NotExist
(
AcrobatDC
){
go
pub
.
Msg
(
`Acrobat DC不存在,请先从"软件安装"中安装`
)
return
}
go
pub
.
Msg
(
`Acrobat DC正在打开`
)
pub
.
SendServer
(
pub
.
GJexecDIYFlag
(
pub
.
Msg_Exec_OpenAdminEXE
,
AcrobatDC
))
return
}
// 其他工具 更新手机代理程序
// 其他工具 更新手机代理程序
func
tUpdateATool
(){
func
tUpdateATool
(){
pub
.
Execcmd_wait
(
`xcopy \\adserver\software\phoneproxy\ATools\win-unpacked C:\Application\win-unpacked /D /S /E /C /y`
)
pub
.
Execcmd_wait
(
`xcopy \\adserver\software\phoneproxy\ATools\win-unpacked C:\Application\win-unpacked /D /S /E /C /y`
)
pub
.
Msg
(
"更新完成"
)
pub
.
Msg
(
"更新完成"
)
}
}
// 其他工具 移动硬盘(胡一波专用)
func
tmovedisk_huyibo
(){
//pub.SendDaemonExec(`F:\SamsungPortableSSD.exe`)
}
// 其他工具 隐藏/显示桌面图标
// 其他工具 隐藏/显示桌面图标
func
tHideShowIcon
(){
func
tHideShowIcon
(){
pub
.
Msg
(
"注:并非所有图标都会列出,没有列出的图标请手动隐藏(右键文件,打开属性,勾选隐藏,点击确定)"
)
pub
.
Msg
(
"注:并非所有图标都会列出,没有列出的图标请手动隐藏(右键文件,打开属性,勾选隐藏,点击确定)"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment