473,382 Members | 1,329 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

"Net Use" command in a browser

296 100+
The below code is not printing the results in a browser as expected :

Expand|Select|Wrap|Line Numbers
  1. #!C:/apache2triad/perl/bin/perl.exe use strict; 
  2. use CGI qw(:standard); 
  3. &main(@ARGV);
  4.  sub main 
  5. {
  6.  my $query = CGI->new(); 
  7. print $query->header; 
  8. print `net use`; 
  9. }

The output as shown below is not showing the network drives unlike in the command prompt:


Expand|Select|Wrap|Line Numbers
  1. New connections will be remembered. There are no entries in the list. 
Sep 8 '08 #1
4 2773
numberwhun
3,509 Expert Mod 2GB
Question, are you trying to run the command 'net use' in your perl script and have the output sent to a web page?

I don't know that it would actually do it or not. You might have to capture the output and then display it.

Regards,

Jeff
Sep 11 '08 #2
KevinADC
4,059 Expert 2GB
The CGI script will run as a different user than a command line script, which might affect what the 'net' command returns.
Sep 11 '08 #3
pankajit09
296 100+
The CGI script will run as a different user than a command line script, which might affect what the 'net' command returns.


I changed the user of the Apache Web Server.

Still no result.
Sep 18 '08 #4
pankajit09
296 100+
Question, are you trying to run the command 'net use' in your perl script and have the output sent to a web page?

I don't know that it would actually do it or not. You might have to capture the output and then display it.

Regards,

Jeff


I am calling a Perl EXE from a PHP file.

The PHP file is run from the browser.
Sep 18 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Mullin Yu | last post by:
if i put the same code at the windows application or console, i can logon to the computer. but, if i put the same code at the windows service and start it, i still can't logon to the machine. ...
1
by: Martin | last post by:
how to use Net View dos command with vb.Net? i want to bacame a string or array or some thing else! Im new so plz. help me with this Problem. thx for your help and Ideas thx
4
by: Joe | last post by:
I am using a 3rd party app that is constantly writing to a text log file. I would like to monitor that file with another app, but I keep getting the dreaded "in use" error when I try to read the...
1
by: Linda | last post by:
Hi, Is there a way to do a "text" (rather than "binary") compareison with the "like" operator, without changing the global "Option Compare" setting? I don't want to risk breaking many, many...
2
by: Terry | last post by:
When using XMLDocument.Save(strFileName) in .NET 2005, is there a way to check (or trap) and see if the file is in use by another. I am using VB.NET. Currently it just bombs and says the filename...
3
by: SF | last post by:
How can I call a "net use" command from within my application? I need to dynamically connect to some remote shares. Thanks, Matt
0
by: shineyang | last post by:
Dear all: Who is kind to help me about the following problem. Why cannot log the remote node by using Net::Telent #################################### The following is normal to the process...
1
Carrugar
by: Carrugar | last post by:
Hi folks, I am issuing the net use command on a couple of Win2003 servers. Some of these servers require that the name and password be authenticated twice and other servers just once, i.e.: ...
1
by: test63 | last post by:
hey, how i can use "net send" command to send a message using ip address? I use windows vista home premium.
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.