Friday, September 13, 2013

How to Run a DLL as an App at Start


1. Right-click on the Desktop and select 'New Shortcut.'
2. Give your shortcut an appropriate name.
3. Enter some variant of the following in the shortcut's code:RUNDLL32.EXE <dllname>,<entrypoint> <optional arguments>where <dllname> is the path and filename of your DLL (the path is not required if a DLL is in the WINDOWS/SYSTEM32 directory), <entrypoint> is the name of the DLL section you want to run, and <optional arguments> vary depending on what exactly you're doing. For example:RUNDLL32.EXE shell32.dll,Control_RunDLLruns 'shell32.dll' at the 'Control_RunDLL' section, which opens the Windows Control Panel.
4. Set the shortcut to run at start-up: move it to the following directory:C:\Documents and Settings\<user>\Start Menu\Programs\Startupwhere <user> is either the name of the user you want this to take effect for or simply 'All Users.'
In Windows Vista and 7
5. Click 'Start,' then type 'Task Scheduler' into the 'Search' box and click the 'Task Scheduler' shortcut.
6. Click 'Create Task.'
7. Give your task an appropriate name and description and check the 'Run with highest privileges' box.
8. Click the 'Triggers' tab and select 'At log on' from the 'Begin the task' drop-down box. Select an affected user or group with the 'Change user or group' button.
9. Click the 'Actions' tab, then the 'New' button. Select 'Start a program' from the 'Action' drop-down box, then enter 'C:\Windows\System32\rundll32.exe' into the 'Program/script' box, and the arguments (as described in the XP section) into the 'Add Arguments' box. Press 'OK' twice to complete the task creation.