Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old October 11th, 2007, 07:50 AM
tvks tvks is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Hyderabad, AP, India
Posts: 49 tvks User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 55 m 43 sec
Reputation Power: 2
Batch File from Server

Hi all,

I am working on PHP with MySQL on a Windows Terminal. I am right now stuck in using batch files in PHP (with Javascript). Let me explain my situation as clear as possible of me.

I have a set of batch files in my htdocs/bat folder on the server.

When the user clicks on a button in the page I desire to execute a batch file present in the server. This batch file should create a directory (the name of which I pass to the batch file) on the clients machine. For example: Assume that there is a batch file called abc.bat which contains the code:
PHP Code:
 md %


If I call the batch file as

PHP Code:
 abc.bat c:/John 


A directory should be created on the clients machine C: drive as John.

In total: The batch file present in the server should be fetched and all its contents (batch file's commands) should be executed completely in the client side.

How do I do it ? Please help me with the code. Its urgent.

Thanx for any help in advance.

Regards,

tvks
I strongly believe PHP never has "no" as an answer

Last edited by tvks : October 11th, 2007 at 07:54 AM.

Reply With Quote
  #2  
Old October 11th, 2007, 06:19 PM
Andrew's Avatar
Andrew Andrew is offline
Moderator
Click here for more information
 
Join Date: Apr 2007
Location: United Kingdom
Posts: 1,946 Andrew User rank is Private First Class (20 - 50 Reputation Level)Andrew User rank is Private First Class (20 - 50 Reputation Level)  Folding Points: 2429 Folding Title: Novice Folder
Time spent in forums: 4 Days 6 h 5 m 6 sec
Reputation Power: 3
As far as I am aware this is impossible as it would be totally insecure as if you could run it from a button click it could be run automatically, which would be a sort of paradise for virus makers etc. You could just have the user download the file and then tell them to run it.

I personally do not see a way PHP could do it, perhaps something like Java could but Ive never really used Java.
__________________
Ubuntu User #13389

Reply With Quote
  #3  
Old October 12th, 2007, 08:14 AM
gmt2001 gmt2001 is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 80 gmt2001 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 9 m 41 sec
Reputation Power: 2
No matter what they msut download/run it on their own. You can, however, make PHP edit the batch file so that the batch file has the folder set
__________________
-gmt2001

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Batch File from Server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT