Arguments read/write
property Sets/gets the target program's arguments. Should be used
only if the target is an application.
Syntax:
object.Arguments = agr_string
variable = object.Arguments
Examples:
Set link = Server.CreateObject("newObjects.utilctls.ShellLink")
Set sf = Server.CreateObject("newObjects.utilctls.SFMain")
link.Path = sf.GetSpecialPath(cGSPDesktopDirectory)
link.Name = "My Sample Link"
link.Target = "Notepad.exe"
link.Arguments = Server.MapPath(Request.ServerVariables("SCRIPT_NAME"))
If link.Save Then
Response.Write "Success"
Else
Response.Write "Error"
End If
Creates a shortcut to NotePad - it will open the asp file that
creates it.
Set link = Server.CreateObject("newObjects.utilctls.ShellLink")
Set sf = Server.CreateObject("newObjects.utilctls.SFMain")
link.Path = sf.GetSpecialPath(cGSPDesktopDirectory)
link.Name = "My app Link"
link.Target = sf.GetSpecialPath(cGSPProgramFiles) & "newObjects\ALP\ALPFrame.exe"
link.Arguments = Server.MapPath("default.asp")
If link.Save Then
Response.Write "Success"
Else
Response.Write "Error"
End If
Creates a shortcut to default ASP page in this directory. The page
will be executed in ALPFrame.
See the ASP Include files for
the constants used above
Remarks:
Not usable with Internet shortcuts (ignored).
If you know the exact location of the application you can pass
whatever arguments you need to it. Usually this can be achieved by
knowing the company/product subdirectory of the application in the
program files directory (see the sample about ALPFrame above). However
you should check if the place where the target application is placed
is not optional (if its setup permits custom location to be chosen
this will not work on all the machines). In some cases if custom
location can be set by the user who started the application's setup
you can still learn it from the registry (see ConfigFile
component) but this should be checked in the documentation or
contacting the vendor.
Applies to: SFShellLink object
Supported on:
Windows 95/NT and later
|