|
Title:
|
How to "Run As Administrator" with parameter?
|
Author:
|
Bob Swart |
Posted:
|
8/11/2007 2:37:13 PM
(GMT+1)
|
Content:
|
I've been working on a number of Delphi 2007 and C++Builder 2007 DataSnap application under Windows Vista, and one of the things I need to do from time to time is to run the DataSnap server application with the /regserver command-line parameter as well as with the "Run As Administrator" option. Without the /regserver command-line, the Delphi 2007 DataSnap servers won't register themselves automatically, but if you pass the /regserver command-line they must be "Run As Administrator", otherwise you'll get a message that This Program has Stopped Working... The problem is that I've been unable to specify both the command-line and the "Run As Administrator" options at the same time. The only workaround I could think of (which I'm still using today), is to first create a shortcut to the DataSnap executable, then modify the properties of the shortcut so it includes the /regserver command-line parameter, and finally execute the shortcut with the "Run As Administrator" option.
If someone knows a better (easier) solution to this problem, please let me know. Thanks in advance!
|
Back |
|