nachiket
asked on
How to start application when windows start
hi!
I want to start my application when windows start... i guess it must be possbile by manipulation registry
thanks in advance
nachiket
I want to start my application when windows start... i guess it must be possbile by manipulation registry
thanks in advance
nachiket
ASKER
thanks for the help i will try this and come back in 2 hours
ASKER
hi
thanks for the help and it worked... can i ask for one more favor?? please!!!
after runnig this code one key is added in HKLM\Software\Microsoft\Wi ndows\Curr entVersion \Run\PMSG which start the application successfully on windows startup... but the problem is suppose now i have added the program to startup and i want to disble this feature after words than??? i mean after i have once added the program to windows startup and i want to remove it afterwords than how to do that?
thank u very much for the help.. waiting.....
nachiket
thanks for the help and it worked... can i ask for one more favor?? please!!!
after runnig this code one key is added in HKLM\Software\Microsoft\Wi
thank u very much for the help.. waiting.....
nachiket
I will put the code in few Mins.
Your points for this is very less!!!
Just joking...
Narayanan
Your points for this is very less!!!
Just joking...
Narayanan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Learning
Here is the code for you,
Needs a reference to the project "Windows Script Host Object Model" WSHOM.OCX
Public Sub EnableStartup()
Dim cPGM As String
Dim oShell As IWshRuntimeLibrary.IWshShe
On Error GoTo ErrEnablestartup
Set oShell = New IWshRuntimeLibrary.IWshShe
cPGM$ = App.Path & "\pmsg.exe"
oShell.RegWrite "HKLM\Software\Microsoft\W
Set oShell = Nothing
Exit Sub
ErrEnablestartup:
Dim strErr As String
strErr = "Err no:" & Err.Number & " Err Desc:" & Err.Description & " Module:Global Proc:EnableStartup " & " Sts:Continue Process " & Date & " " & Time
Call ErrorLog(strErr)
End Sub
'Where PMSG.EXE is your application name