No error or any feedback that I can work with.
Code:
set objShell = Server.CreateOb ject("WScript.S hell")
objShell.Run "%comspec% /c NET PRINT \\Garchive\ISLa ser c:\WUTemp\Prin ter_Status1.txt ", 0, True
objShell.Run "%comspec% /c PRINT /d:\\Garchive\IS Laser c:\WUTemp\test. txt",
0, True
Set objShell = nothing
I can run these commands successfully from the command-prompt on the server
but from an ASP page, I get nothing not even an error. The Text output for
NET PRINT is a blank text file.
I feel something is different on the permissions side because this
code/approach use to work fine.
Thanks in advance for any help. Would a DCOM setting be applicable here? 4 9742
I'd imagine there's a good chance that your IUSR account doesn't have share
permissions to that printer on your network. Does that printer share
require domain authentication? If so, your local IUSR account will not be
able to connect to it.
While this doesn't focus on printing specifically, the same logic would
apply here: http://www.aspfaq.com/show.asp?id=2168 (If the file is within
your LAN section)
Ray at work
"Salty Dog" <Sa******@discu ssions.microsof t.com> wrote in message
news:16******** *************** ***********@mic rosoft.com... No error or any feedback that I can work with. Code: set objShell = Server.CreateOb ject("WScript.S hell")
objShell.Run "%comspec% /c NET PRINT \\Garchive\ISLa serc:\WUTemp\Prin ter_Status1.txt ", 0, True objShell.Run "%comspec% /c PRINT /d:\\Garchive\IS Laser
c:\WUTemp\test. txt", 0, True
Set objShell = nothing
I can run these commands successfully from the command-prompt on the
server but from an ASP page, I get nothing not even an error. The Text output
for NET PRINT is a blank text file.
I feel something is different on the permissions side because this code/approach use to work fine.
Thanks in advance for any help. Would a DCOM setting be applicable here?
I've had the anonymous user as a domain admin in an effort to open things up.
Still no error and no response/print.
I was able to access the file using FileSystemObjec t via ASP.
Any other ideas?
"Ray Costanzo [MVP]" wrote: I'd imagine there's a good chance that your IUSR account doesn't have share permissions to that printer on your network. Does that printer share require domain authentication? If so, your local IUSR account will not be able to connect to it.
While this doesn't focus on printing specifically, the same logic would apply here: http://www.aspfaq.com/show.asp?id=2168 (If the file is within your LAN section)
Ray at work "Salty Dog" <Sa******@discu ssions.microsof t.com> wrote in message news:16******** *************** ***********@mic rosoft.com... No error or any feedback that I can work with. Code: set objShell = Server.CreateOb ject("WScript.S hell")
objShell.Run "%comspec% /c NET PRINT \\Garchive\ISLa serc:\WUTemp\Prin ter_Status1.txt ", 0, True objShell.Run "%comspec% /c PRINT /d:\\Garchive\IS Laser c:\WUTemp\test. txt", 0, True
Set objShell = nothing
I can run these commands successfully from the command-prompt on the server but from an ASP page, I get nothing not even an error. The Text output for NET PRINT is a blank text file.
I feel something is different on the permissions side because this code/approach use to work fine.
Thanks in advance for any help. Would a DCOM setting be applicable here?
How did you make a local account a domain admin? Regardless, you can access
the remote file system? Alright, try this:
net use lpt1: \\Garchive\ISLa ser
copy c:\WUTemp\test. txt lpt1
net use lpt1: /d
Also make sure that your IUSR has permissions to net.exe, and the C:\WUTemp
directory.
Ray at work
"Salty Dog" <Sa******@discu ssions.microsof t.com> wrote in message
news:C8******** *************** ***********@mic rosoft.com... I've had the anonymous user as a domain admin in an effort to open things
up. Still no error and no response/print.
I was able to access the file using FileSystemObjec t via ASP. Any other ideas?
"Ray Costanzo [MVP]" wrote:
I'd imagine there's a good chance that your IUSR account doesn't have
share permissions to that printer on your network. Does that printer share require domain authentication? If so, your local IUSR account will not
be able to connect to it.
While this doesn't focus on printing specifically, the same logic would apply here: http://www.aspfaq.com/show.asp?id=2168 (If the file is
within your LAN section)
Ray at work "Salty Dog" <Sa******@discu ssions.microsof t.com> wrote in message news:16******** *************** ***********@mic rosoft.com... No error or any feedback that I can work with. Code: set objShell = Server.CreateOb ject("WScript.S hell")
objShell.Run "%comspec% /c NET PRINT \\Garchive\ISLa ser >c:\WUTemp\Prin ter_Status1.txt ", 0, True objShell.Run "%comspec% /c PRINT /d:\\Garchive\IS Laser c:\WUTemp\test. txt", 0, True
Set objShell = nothing
I can run these commands successfully from the command-prompt on the server but from an ASP page, I get nothing not even an error. The Text
output for NET PRINT is a blank text file.
I feel something is different on the permissions side because this code/approach use to work fine.
Thanks in advance for any help. Would a DCOM setting be applicable
here?
I get error '80070002' on the copy line
Also I tried:
Set objFilePrint = objFSO.CreateTe xtFile("\\Garch ive\ISLaser",Tr ue)
and got a "Permission Denied" error.
My anonymous user is assigned to a separate Domain Administrator account
(not IUSR).
I now have several code options to print the text file that work at the
command-prompt but not in ASP. It appears to be a permissions issue in ASP
but my authenticated user has permisssions. I made IWAM a temporary member
of the local administrator's group for testing. There seems to be another
step in the process that I'm unaware of that prevents permission. It reminds
me of needing to assign the launch identitiy in DCOM but I'm not clear as to
which application this would be.
i appreciate your help!
"Ray Costanzo [MVP]" wrote: How did you make a local account a domain admin? Regardless, you can access the remote file system? Alright, try this:
net use lpt1: \\Garchive\ISLa ser copy c:\WUTemp\test. txt lpt1 net use lpt1: /d
Also make sure that your IUSR has permissions to net.exe, and the C:\WUTemp directory.
Ray at work
"Salty Dog" <Sa******@discu ssions.microsof t.com> wrote in message news:C8******** *************** ***********@mic rosoft.com... I've had the anonymous user as a domain admin in an effort to open things up. Still no error and no response/print.
I was able to access the file using FileSystemObjec t via ASP. Any other ideas?
"Ray Costanzo [MVP]" wrote:
I'd imagine there's a good chance that your IUSR account doesn't have share permissions to that printer on your network. Does that printer share require domain authentication? If so, your local IUSR account will not be able to connect to it.
While this doesn't focus on printing specifically, the same logic would apply here: http://www.aspfaq.com/show.asp?id=2168 (If the file is within your LAN section)
Ray at work "Salty Dog" <Sa******@discu ssions.microsof t.com> wrote in message news:16******** *************** ***********@mic rosoft.com... > No error or any feedback that I can work with. > Code: > set objShell = Server.CreateOb ject("WScript.S hell") > > objShell.Run "%comspec% /c NET PRINT \\Garchive\ISLa ser > >c:\WUTemp\Prin ter_Status1.txt ", 0, True > objShell.Run "%comspec% /c PRINT /d:\\Garchive\IS Laser c:\WUTemp\test. txt", > 0, True > > Set objShell = nothing > > I can run these commands successfully from the command-prompt on the server > but from an ASP page, I get nothing not even an error. The Text output for > NET PRINT is a blank text file. > > I feel something is different on the permissions side because this > code/approach use to work fine. > > Thanks in advance for any help. Would a DCOM setting be applicable here?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bill |
last post by:
I used to be able to run the following ASP code on our corp machine (W2K
Server Edition and IIS-5)
and successfully send a net-msg to anyone on our intranet.
Last week it stopped working... and I'm not sure what changed.
(I had applied ALL the W2K update patches... but... I'm not sure if the
problem started before or after that.)
Did any recent W2K patches change the way createObject, wScript.shell, or
"NET SEND" works?
|
by: Kyle |
last post by:
To any who chose to provide an answer, or even any suggestions to this
problem, I thank you greatly in advance. +200 pts. for any valid
solutions.
I am currently in the process of converting a website from an existing
web host to our servers. This website used the WScript.Shell command
to execute a series of Java commands that would send an encrypted
email.
I ran these commands directly on the server and they execute properly,
|
by: MacKenzie |
last post by:
The statement in an asp page:
dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
now gives this error:
VB err= 424,Object required
If I use setobjShell=Server.CreateObject("WScript.Shell"), I get the error
VB err= 5,Invalid procedure call or argument
|
by: rcmail14872 |
last post by:
I have seen some very general suggestions for alternative code to the
WScript.Shell code, but nothing specific. In the two lines of code
below (I think) the first line creates a text file on the hard drive.
When I get to this line I get runtime error 429 "ActiveX component
can't create object". I know I should not use WSH but I haven't been
able to figure out an alternative. I tried looking through the VBA
editor help file for "file"...
|
by: Daniel Di Vita |
last post by:
I am trying to run a command line from an ASP page. I am using windows 2003
with IIS6. I am able to get this to run on my local machine (Windows XP
IIS5). Here is my code:
jobNbr = Request.QueryString("jobNbr")
'Log in as an admin. I created a component to impersonate an administrator.
‘This works fine
Set objLogon = Server.CreateObject("LoginAdmin.ImpersonateUser")
objLogon.Logon "AdminUser", "AdminPassword", "domain"
| |
by: edurran |
last post by:
Hi all,
I have spent the last three days on this problem. Looked in many forums and not found the answer as yet. Hopefully ye can help.
I have two functions. One works fine, the second does not.
First Function
Function try1
SET objShell = CreateObject("Wscript.Shell")
|
by: AirYT |
last post by:
Done a bunch of searching on this topic and i have come up with nothing.
I have a .vbs script that i wish to execute by calling an asp page.
i am working on a W2K server with IIS5.0 & SP4.
My stopwebsite.vbs file is as follows:
===
On Error Resume Next
|
by: mdfidahussain |
last post by:
hello frnds,
I have written a simple asp .net code in button click event, in which should run "xx.cmd" file when pressed
(below is the code)
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
|
by: =?Utf-8?B?VG9kZA==?= |
last post by:
Hello I'm using the following script to try and ping:
<% Response.Buffer = true %>
<%
url = "www.espn.com"
Set objWShell = CreateObject("WScript.Shell")
Set objCmd = objWShell.Exec("ping " & url)
strPResult = objCmd.StdOut.Readall()
set objCmd = nothing: Set objWShell = nothing
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |