- 积分
- 0
- 注册时间
- 2002-5-20
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2009-1-8 15:20:24
|
显示全部楼层
来自 河南新乡
可以借助nsis
http://www.chinavib.com/forum/thread-5382-1-1.html
1. Compile your GUI into an exe. We'll call it "foo.exe".
2. Download and install NSIS - the installation program created and
used by the fine folks at Nullsoft (think Winamp):
http://www.nullsoft.com/free/nsis/
3. Make an NSIS script text file in the same directory as your exe,
let's call it "file.nsi". Put the following text in there:
SilentInstall silent
; The name of the NSIS install program you're creating
Name "NotSeen"
; The file that NSIS writes
OutFile "nocmdwindow.exe"
Section "Ignore"
; Change this exe file to the name of the exe you created
nsExec::Exec "cmd /C foo.exe"
SectionEnd
4. Save the file and compile it into the new exe ("nocmdwindow.exe")
by right clicking on it and selecting Compile. Or you can open the
"Make NSIS GUI" window and select "Load Script..." from the File menu.
5. Now run "nocmdwindow.exe". As promised, no command window. And
so simple to implement. Plus, if you ever want to see the command
window for diagnostic purposes, you can always run the original exe
file ("foo.exe"), and it will run normally with its glorious DOS
window.
You also have a really easy to use and powerful Windows installer
program that's free. The no command window trick works with NSIS by
calling a dll (nsExec.dll) and running the program through it,
suppressing all text output, but leaving popup windows alone. |
评分
-
1
查看全部评分
-
|