如何让我的程序在windows安全模式下也可以自动运行?(20分)

  • 主题发起人 主题发起人 sxlyq
  • 开始时间 开始时间
S

sxlyq

Unregistered / Unconfirmed
GUEST, unregistred user!
就是启动后自动运行!这样做可以吗?
 
在安全模式下好象只会运行Explorer.应该不行.
 
只有想不到的,没有做不到的啊,:)
 
我见过,但我不会,例如:金山读吧
 
曾经好像听过,可以把你的程序挂接到explorer上!
 
[blue]非安全模式下肯定可以,安全模式下就不知道了[/blue]<br><br>//写<br>var<br>&nbsp; RegF:TRegistry;<br>begin<br>&nbsp; RegF:=Tregistry.Create;<br>&nbsp; RegF.RootKey:=HKEY_LOCAL_MACHINE;<br>&nbsp; try<br>&nbsp; &nbsp; RegF.OpenKey('SOFTWARE/Microsoft/Windows/CurrentVersion/Run',True);<br>&nbsp; &nbsp; //设置开机是否自动运行<br>&nbsp; &nbsp; if CheckBox1.Checked then<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; RegF.DeleteValue('Capture');<br>&nbsp; &nbsp; &nbsp; RegF.WriteString('Capture',Application.ExeName);<br>&nbsp; &nbsp; end<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; RegF.DeleteValue('Capture');<br>&nbsp; except<br><br>&nbsp; end;<br>&nbsp; &nbsp;RegF.CloseKey;<br>&nbsp; &nbsp;RegF.Free;<br>//读<br>RegF:=Tregistry.Create;<br>&nbsp; RegF.RootKey:=HKEY_LOCAL_MACHINE;<br>&nbsp; try<br>&nbsp; &nbsp; RegF.OpenKey('SOFTWARE/Microsoft/Windows/CurrentVersion/Run',True);<br>&nbsp; &nbsp; if RegF.ValueExists('Capture') then<br>&nbsp; &nbsp; &nbsp; CheckBox1.Checked:=True<br>&nbsp; &nbsp; else<br>&nbsp; &nbsp; &nbsp; CheckBox1.Checked:=False;<br>&nbsp; except
 
在win.ini中Shell改为你的程序,在你的程序启动后,在启动explorer!!windows 2000/98<br>xp没有试过!!!
 
能具体说说怎么修改吗???
 
我试试zibing的方法看看!不过还请ziDing大侠快些回话呀!
 
; for 16-bit app support<br>[fonts]<br>[extensions]<br>[mci extensions]<br>[files]<br>[Mail]<br>MAPI=1<br>[MCI Extensions.BAK]<br>aif=MPEGVideo<br>aifc=MPEGVideo<br>aiff=MPEGVideo<br>asf=MPEGVideo<br>asx=MPEGVideo<br>au=MPEGVideo<br>m1v=MPEGVideo<br>m3u=MPEGVideo<br>mp2=MPEGVideo<br>mp2v=MPEGVideo<br>mp3=MPEGVideo<br>mpa=MPEGVideo<br>mpe=MPEGVideo<br>mpeg=MPEGVideo<br>mpg=MPEGVideo<br>mpv2=MPEGVideo<br>snd=MPEGVideo<br>wax=MPEGVideo<br>wm=MPEGVideo<br>wma=MPEGVideo<br>wmv=MPEGVideo<br>wmx=MPEGVideo<br>wpl=MPEGVideo<br>wvx=MPEGVideo<br><br>以上是win.ini win2003下的!可是怎么改呀!
 
在win.ini中Shell改为你的程序,在你的程序启动后,在启动explorer!!windows 2000/98<br>xp没有试过!!! &nbsp;---- &nbsp;这样应该可以。<br>如果不可以 吧explorer.exe 改称你的程序,然后让你的 程序调用explorer.exe
 
to人在昆明:<br><br>  我在DFW上见过你许多的帖子,对你对较敬仰。 刚才我贴出来的是我计算机win2003上的win.ini文件。<br>  可是我还是不明白该怎样操作。请明示,谢谢!
 
还记得 win98时代吗?<br>第一行好像是 run = explorer.exe<br>大约是这么些的吧,然后你就可以 吧explorer.exe 改称你的程序。<br>到了win2k 以上的时代,这一项作了升级,写入了注册表,不过ms 为了兼容<br>你还是可以用写ini的 方式(实际的值却写进了注册表),具体位置你可以去看看。<br><br>最后声明: 我很菜的,不要仰慕我,:)!
 
前几天回家了,没看到!!人在昆明说得对,到了win2k 以上的时代,这一项作了升级,写入了注册表,不过ms 为了兼容你还是可以用写ini的 方式(实际的值却写进了注册表),但是,不是run = explorer.exe而是shell = explorer.exe(路径),你找一个98的机器看看就知道了,xp/2000不是写在win.ini里面,而是在注册表里,自己收缩一下
 
HKEY_CLASSES_ROOT/CLSID/{208D2C60-3AEA-1069-A2D7-08002B30309D}/shell/find/command<br>HKEY_CLASSES_ROOT/CompressedFolder/Shell/find/command<br>HKEY_CLASSES_ROOT/Directory/shell/find/command<br>....<br><br><br>其值如:<br>1、<br>名称 (默认)<br>类型 REG_EXPAND_SZ<br>数据 %SystemRoot%/Explorer.exe<br>2、<br>数据 c:/windows/explorer.exe<br>...<br><br><br>怎么找呢?各位DFW倒是说清楚点呀!如哪位通给我可行的方案。小弟另开一贴,再送之50大洋。(嘿嘿,以有我有分了,我再加!)
 
你可以把你的程序放在啟動 根目錄下取名為explorer.exe,然後在你的程序中調用c:/windows/explorer.exe,這樣你的程序會先運行,而不必改注冊表!你試試!!
 
呵呵,楼上的方法妙
 
后退
顶部