Jump to content











Photo
- - - - -

Using RUNDLL32.exe


  • Please log in to reply
9 replies to this topic

#1 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10544 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 14 August 2006 - 03:18 PM

Rundll32 is used to run certain operations on windows, but many more are available. Feel free to post them around here too..

Here it is:

http://www.dx21.com/...F...P?ISF=0&P=A


I was looking for a way to run ShellExecute from shell32.dll, but still couldn't find a proper answer for this at the moment, perhaps someone else knows how?

:P

#2 Draugen

Draugen

    Frequent Member

  • .script developer
  • 147 posts
  • Location:South of Heaven

Posted 14 August 2006 - 06:29 PM

a quick MSDN search indicates that

rundll32.exe shell32.dll,ShellExecute {parameters to shellexecute go here}

SHOULD do the trick.

Very untested though ;D

#3 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10544 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 14 August 2006 - 07:09 PM

Still clueless on the parameters..

Here's a few links:
http://support.micro...com/kb/q164787/
http://www.robvander...com/rundll.html

But the operation fails everytime, in delphi I'd define a Handle variable to run with shellExecute, but it doesn't apply here. Does anyone knows how to pass the right parameters for this to work? :P

If possible, of course..

#4 Draugen

Draugen

    Frequent Member

  • .script developer
  • 147 posts
  • Location:South of Heaven

Posted 15 August 2006 - 07:50 AM

are you sure you do not need to pass a window handle to ShellExecute? As far as i gatherered, when you call a dll function with rundll32, it works the same as calling that function from within source code.

But i may be wrong, ofcourse :P

#5 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10544 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 15 August 2006 - 11:01 PM

I think you do have to assign a window handle to make it happen, in delphi I assign it to an empty handle variable and it works fine..

How would one do this with rundll? :P

#6 Draugen

Draugen

    Frequent Member

  • .script developer
  • 147 posts
  • Location:South of Heaven

Posted 16 August 2006 - 06:49 AM

As far as I can gather: in exactly the same way.

rundll32.exe syntax:

rundll32[.exe] file.dll,EntryPoint [parameter 1] [parameter2] ... [parameter n]

#7 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10544 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 16 August 2006 - 08:54 AM

parameter 1


Should be the window handle, what to use in it since there are no variables? :P

I've googled around a bit, but couldn't find a proper answer for this.. :P

#8 Draugen

Draugen

    Frequent Member

  • .script developer
  • 147 posts
  • Location:South of Heaven

Posted 16 August 2006 - 10:32 AM

can't you just experiment? fire up the windows 'run' dialog or your %COMSPEC%, and issue various 'rundll32 Shell32.dll,ShellExecute .....' calls.

#9 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10544 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 16 August 2006 - 10:47 AM

can't you just experiment? fire up the windows 'run' dialog or your %COMSPEC%, and issue various 'rundll32 Shell32.dll,ShellExecute .....' calls.


I spent quite a while yesterday doing it.. :P

#10 Joshua

Joshua

    Silver Member

  • Advanced user
  • 526 posts
  • Location:Germany
  • Interests:Computer, Bikes, and many others
  •  
    Germany

Posted 16 August 2006 - 03:10 PM

in vb6, i do it this way, may be that can help you. :P

lngPid = Shell("Rundll32.exe devmgr.dll DeviceProperties", essSW_SHOWNORMAL)


joshua




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users