¶Ô×¢²á±í²Ù×÷¼¼ÇÉ-½«³ÌÐòÔÚ¿ª»úʱÔËÐÐ
ÎÒÃÇ¿ÉÒÔ¿´µ½Ò»Ð©³ÌÐòÔÚ¿ª»úʱ¾Í»á×Ô¶¯ÔËÐУ¬ÏóWinpopup¾ÍÊÇÕâÑùµÄ£¬ÕâÊÇÔõôʵÏÖµÄÄØ£¿¿ÉÒÔ°ÑÐèÒªÔËÐеijÌÐòÌí¼Óµ½¡°¿ªÊ¼¡±-¡°³ÌÐò¡±-¡°Æô¶¯¡±ÖУ¬»¹ÓÐÒ»ÖÖ·½·¨¾ÍÊÇдÈë×¢²á±íÁË£¬ÕâÀïÎÒÃÇÌÖÂÛͨ¹ýдע²á±íÀ´ÊµÏֵķ½·¨£¬´ÓÖпÉÒÔ¿´µ½Èý¸ö¶Ô×¢²á±í²Ù×÷µÄAPIº¯ÊýµÄʹÓü¼ÇÉ¡£¡¡¡¡Ê×ÏÈÒªÉùÃ÷ÕâÈý¸öAPIº¯Êý£¬ËüÃÇ·Ö±ðÊÇ£ºRegSetvalue¡¢RegCreateKey¡¢RegCloseKey£¬Æä×÷ÓÃÊÇÉèÖÃijһ¸öÖ÷¼üµÄ¼üÖµ¡¢´´½¨Ò»¸öÖ÷¼ü¡¢¹Ø±Õ¶Ô×¢²á±íÖ÷¼üµÄ²Ù×÷¡£ ¡¡¡¡¡¡Private Declare Function RegSetvalue Lib "advapi32.dll" Alias "RegSetvalueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long ¡¡¡¡¡¡Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long ¡¡¡¡¡¡Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long ¡¡¡¡È»ºóÉùÃ÷ÒÔÏÂÁ½¸ö³£Êý£¬Òª½øÐÐ×¢²á±íдÈëµÄλÖÃÊÇÔÚHKEY_LOCAL_MACHINEÏ£¬ÎÒÃÇ¿ÉÒÔÔÚVB×Ô´øµÄAPIÎı¾²é¿´Æ÷ÖÐÕÒµ½ÕâЩ³£ÊýµÄ¶¨Òå·½·¨¡£ ¡¡¡¡¡¡Private Const HKEY_LOCAL_MACHINE = &H80000002; ¡¡¡¡¡¡Private Const REG_SZ = 1 ¡¡¡¡È»ºóʹÓÃÈçÏÂÓï¾ä¾ÍÐÐÁË£¬Äã¿ÉÒÔ°ÑÕâ¶Î´úÂë·ÅÔÚ³ÌÐòµÄij¸öλÖ㺠¡¡¡¡'дע²á±í ¡¡¡¡Dim Ret2 As Long ¡¡¡¡'´ò¿ª HKEY_LOCAL_MACHINE¡¡Ïµġ¡software\microsoft\windows\currentVersion\runServices¡¡Ö÷¼ü ¡¡¡¡RegCreateKey HKEY_LOCAL_MACHINE, "software\microsoft\windows\currentVersion\runServices", Ret2 ¡¡¡¡'½«´ËÖ÷¼üϵġ°Ä¬ÈÏ¡±ÏîµÄÖµ¸ÄΪ"c:\windows\system\myprogram.exe"£¬Ò²¾ÍÊÇÒª¿ª»úÔËÐеijÌÐò·¾¶ ¡¡¡¡RegSetvalue Ret2, vbNullString, REG_SZ, "c:\windows\system\sysinfo2.exe", 4 ¡¡¡¡'¹Ø±Õ¶ÔÖ÷¼üµÄ²Ù×÷ ¡¡¡¡RegCloseKey Ret2
--------------------------------------------------------------------------------
Ïà¹ØÎÄÕÂ
ÏÞÖÆÈí¼þÊÔÓôÎÊý¼°Ê±¼ä 2003-11-13 10:54:17
ÏÞÖÆÈí¼þ30ÌìÊÔÓà 2003-11-13 10:53:18
ACCESSµÄÊý¾Ý¿â°²È«ÎÊÌâ½â´ð 2003-11-13 10:52:11
ÈçºÎÇ¿ÖÆ Access ÏÔʾËÄλÊýÄê·ÝµÄÈÕÆÚ 2003-10-10 10:34:21
AccessÆô¶¯ÃüÁîÐÐÑ¡Ïî´óÈ« 2003-10-10 10:02:00
|