Forums
This topic is locked
Launching external app from button.Can it be done?
Posted 31 Jul 2001 05:38:44
1
has voted
31 Jul 2001 05:38:44 chris Fodder!! posted:
Hi, I was wonderiing if I could have a button on my page so that when I click on it, it would open up and external program. I have tried the following code and i could not get it to work.
' nput type="button" name="Admin_share" value="Adminstrativly Share To This Computer" onclick="adminshare.bat <%=(Department.Fields.Item("Compnumber".Value)%>"
and
select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<option value="adminshare.bat <%=(Department.Fields.Item("Compnumber".Value)%>" selected>Administrativly share to this
computer</option>
<option value="VNC_TO_Machine.bat">VNC to this computer.</option>
</select>
On the page, as you can tell, is a dynamic record. I am using a batch file with the computer number as a variable in the batch. The file at the moment just wants to start explorer and map a network drive.
I have administrative access to the entire network, so that is not a problem.
But it seems that it will not run the batch file at all. The second option does try to find a page called adminshare.bat but wont run it.
Any got any ideas what i am missing?
Replies
Replied 31 Jul 2001 06:03:37
31 Jul 2001 06:03:37 chris Fodder!! replied:
Ok just a little more information.
it seems that the batch file has a problem with the '%20' (which should equal a space) between it and the computer number.
anyone know how i could get around this?
it seems that the batch file has a problem with the '%20' (which should equal a space) between it and the computer number.
anyone know how i could get around this?
Replied 31 Jul 2001 09:01:39
31 Jul 2001 09:01:39 Bjorn Fripon replied:
Hi,
You're right about the the %20.
On the .bat file, I guess a browser always tries to download it. I think i read some articles on this issue on the Microsoft site.
Oh yeah, here it is <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
support.microsoft.com/support/kb/articles/Q232/0/77.ASP?LN=EN-US&SD=gn&FR=0&qry=running%20an%20exe&rnk=4&src=DHCS_MSPSS_gn_SRCH&SPR=IEP
Good luck and maybe you could share your solution or write a tutorial <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>
greetz
Jezter
You're right about the the %20.
On the .bat file, I guess a browser always tries to download it. I think i read some articles on this issue on the Microsoft site.
Oh yeah, here it is <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
support.microsoft.com/support/kb/articles/Q232/0/77.ASP?LN=EN-US&SD=gn&FR=0&qry=running%20an%20exe&rnk=4&src=DHCS_MSPSS_gn_SRCH&SPR=IEP
Good luck and maybe you could share your solution or write a tutorial <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>
greetz
Jezter
Replied 01 Aug 2001 00:13:21
01 Aug 2001 00:13:21 I Mahomed replied:
i know you can run exe's like so, blahblah.exe?Parameter1=?
but they need to be cgi type apps.
this seems to work with ping.exe and nbtstat.exe <img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle> even displays the results in your browser. maybe you should compile your app into an exe to take param's like dat ? set your post meathod to
"GET" <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Check out www.sycon.co.za/users/play/index.htm all those options are provided by diffrent external applications. DOnt do anything nasty with them thou <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> theu merely for testing purposes <img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle>
laterz
disorder
Edited by - Disorder on 08/01/2001 00:17:58
but they need to be cgi type apps.
this seems to work with ping.exe and nbtstat.exe <img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle> even displays the results in your browser. maybe you should compile your app into an exe to take param's like dat ? set your post meathod to
"GET" <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Check out www.sycon.co.za/users/play/index.htm all those options are provided by diffrent external applications. DOnt do anything nasty with them thou <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> theu merely for testing purposes <img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle>
laterz
disorder
Edited by - Disorder on 08/01/2001 00:17:58
Replied 01 Aug 2001 02:48:40
01 Aug 2001 02:48:40 chris Fodder!! replied:
Thank you to both of you.
I am currently trying to get one or both of them working. When finnished i will post a tutrial if wanted.
Fodder.
I am currently trying to get one or both of them working. When finnished i will post a tutrial if wanted.
Fodder.
Replied 01 Aug 2001 20:29:26
01 Aug 2001 20:29:26 I Mahomed replied:
well i think your prob could be using a form ? on the site i got above im using links
it seems to work fine.. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
it seems to work fine.. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Replied 02 Aug 2001 01:03:11
02 Aug 2001 01:03:11 chris Fodder!! replied:
Nope, i carnt get it to run the bat file from the server on the local machine with the dynamic extension.
Two problems exist.
1 IE wont let you run a script with out permission.
I can then do it in cgi but that is were problem no. 2 comes in
2 I am a lowly pid and poorly trainned webmaster. The company wont put me on any courses. <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>
So if any one knows of a good tutorial on cgi scripting (in vb coz i can get someone to help me with vb) please let me know.
The
Lowly Paid & trained Webmaster
Two problems exist.
1 IE wont let you run a script with out permission.
I can then do it in cgi but that is were problem no. 2 comes in
2 I am a lowly pid and poorly trainned webmaster. The company wont put me on any courses. <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>
So if any one knows of a good tutorial on cgi scripting (in vb coz i can get someone to help me with vb) please let me know.
The
Lowly Paid & trained Webmaster