473,414 Members | 1,757 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,414 software developers and data experts.

wshshell.run

I'm trying to start up a command from inside my asp code to modify
permissions on folders. When I do I get the error

Microsoft VBScript runtime error '800a01a8'

Object required: ''

/newuser.asp, line 120

Line 120 is the WshShell.Run strWShell This works fine in vb script.
I'm not very savvy with asp so I'm unclear as to why I'm getting this error?
'Create Folder Skeleton
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''
'''''
''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''
'''''
Set FS = CreateObject("Scripting.FileSystemObject")
Set WSHNetwork = CreateObject("WScript.Network")

Set WshShell = WScript.CreateObject("WScript.Shell")

FS.CreateFolder(ParentDir & strName)
'Build Domain Admins

On Error Goto 0

strWShell = "\\admin04\bin\xcacls " & ParentDir & strName & " /G " &
txtQuote & "GOB\Domain Admins" & txtQuote & ":F /Y"
WshShell.Run strWShell
Any help is appreciated.
--

Paul Bergson
Nov 19 '05 #1
7 2712
"Paul Bergson" <pb******@mnpower.com> wrote in message
news:OO**************@TK2MSFTNGP12.phx.gbl...
Line 120 is the WshShell.Run strWShell This works fine in vb
script.
I'm not very savvy with asp so I'm unclear as to why I'm getting this
error?


Are you actually talking about "classic" ASP, i.e. not ASP.NET?
Nov 19 '05 #2
Web pages do not have this level of security permissions by default.
If web pages could run anything they wanted on a users machine, that would
be quite a security hole, don't you think?
You can only get this to work in IE if each browser has customized security
options that allow it to work.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Paul Bergson" <pb******@mnpower.com> wrote in message
news:OO**************@TK2MSFTNGP12.phx.gbl...
I'm trying to start up a command from inside my asp code to modify
permissions on folders. When I do I get the error

Microsoft VBScript runtime error '800a01a8'

Object required: ''

/newuser.asp, line 120

Line 120 is the WshShell.Run strWShell This works fine in vb
script.
I'm not very savvy with asp so I'm unclear as to why I'm getting this
error?
'Create Folder Skeleton
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''
'''''
''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''
'''''
Set FS = CreateObject("Scripting.FileSystemObject")
Set WSHNetwork = CreateObject("WScript.Network")

Set WshShell = WScript.CreateObject("WScript.Shell")

FS.CreateFolder(ParentDir & strName)
'Build Domain Admins

On Error Goto 0

strWShell = "\\admin04\bin\xcacls " & ParentDir & strName & " /G " &
txtQuote & "GOB\Domain Admins" & txtQuote & ":F /Y"
WshShell.Run strWShell
Any help is appreciated.
--

Paul Bergson

Nov 19 '05 #3
Yet this is classic and I'm trying to get it to run it on the server side.
I'm not even sure if it is possible.

--

Paul Bergson MCT, MCSE, MCSA, CNE, CNA, CCA

This posting is provided "AS IS" with no warranties, and confers no rights.

"Mark Rae" <ma**@mark-N-O-S-P-A-M-rae.co.uk> wrote in message
news:OS**************@TK2MSFTNGP09.phx.gbl...
"Paul Bergson" <pb******@mnpower.com> wrote in message
news:OO**************@TK2MSFTNGP12.phx.gbl...
Line 120 is the WshShell.Run strWShell This works fine in vb
script.
I'm not very savvy with asp so I'm unclear as to why I'm getting this
error?


Are you actually talking about "classic" ASP, i.e. not ASP.NET?

Nov 19 '05 #4
I'm trying to get this to run on the server side. Should have nothing to do
with the client

--

Paul Bergson

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:#Y**************@TK2MSFTNGP09.phx.gbl...
Web pages do not have this level of security permissions by default.
If web pages could run anything they wanted on a users machine, that would
be quite a security hole, don't you think?
You can only get this to work in IE if each browser has customized security options that allow it to work.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Paul Bergson" <pb******@mnpower.com> wrote in message
news:OO**************@TK2MSFTNGP12.phx.gbl...
I'm trying to start up a command from inside my asp code to modify
permissions on folders. When I do I get the error

Microsoft VBScript runtime error '800a01a8'

Object required: ''

/newuser.asp, line 120

Line 120 is the WshShell.Run strWShell This works fine in vb
script.
I'm not very savvy with asp so I'm unclear as to why I'm getting this
error?
'Create Folder Skeleton
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''' '''''
''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''' '''''
Set FS = CreateObject("Scripting.FileSystemObject")
Set WSHNetwork = CreateObject("WScript.Network")

Set WshShell = WScript.CreateObject("WScript.Shell")

FS.CreateFolder(ParentDir & strName)
'Build Domain Admins

On Error Goto 0

strWShell = "\\admin04\bin\xcacls " & ParentDir & strName & " /G " &
txtQuote & "GOB\Domain Admins" & txtQuote & ":F /Y"
WshShell.Run strWShell
Any help is appreciated.
--

Paul Bergson


Nov 19 '05 #5
OIC, well you still may be having permission issues. Make sure the ASPNET
user account has permission to access the file, or use impersonation to have
it run under another user account.
And you probably shouldn't be using scripting. This is ASP.NET and there
are better ways, such as the Process namespace:

Dim csc As System.Diagnostics.Process = New System.Diagnostics.Process()
csc.StartInfo.FileName = "c:\SomePath\MyCommandLineApp.exe"
csc.Start()

Here's more info:
http://msdn.microsoft.com/library/de...starttopic.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"Paul Bergson" <pb******@mnpower.com> wrote in message
news:Ol**************@TK2MSFTNGP14.phx.gbl...
I'm trying to get this to run on the server side. Should have nothing to
do
with the client

--

Paul Bergson

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:#Y**************@TK2MSFTNGP09.phx.gbl...
Web pages do not have this level of security permissions by default.
If web pages could run anything they wanted on a users machine, that
would
be quite a security hole, don't you think?
You can only get this to work in IE if each browser has customized

security
options that allow it to work.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Paul Bergson" <pb******@mnpower.com> wrote in message
news:OO**************@TK2MSFTNGP12.phx.gbl...
> I'm trying to start up a command from inside my asp code to modify
> permissions on folders. When I do I get the error
>
> Microsoft VBScript runtime error '800a01a8'
>
> Object required: ''
>
> /newuser.asp, line 120
>
>
>
> Line 120 is the WshShell.Run strWShell This works fine in vb
> script.
> I'm not very savvy with asp so I'm unclear as to why I'm getting this
> error?
>
>
> 'Create Folder Skeleton
> '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''' > '''''
> ''''''''''''''''''''''''''''''
> ''''''''''''''''''''''''''''''
> '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''' > '''''
> Set FS = CreateObject("Scripting.FileSystemObject")
> Set WSHNetwork = CreateObject("WScript.Network")
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
>
>
>
> FS.CreateFolder(ParentDir & strName)
> 'Build Domain Admins
>
> On Error Goto 0
>
> strWShell = "\\admin04\bin\xcacls " & ParentDir & strName & " /G " &
> txtQuote & "GOB\Domain Admins" & txtQuote & ":F /Y"
> WshShell.Run strWShell
>
>
> Any help is appreciated.
> --
>
> Paul Bergson
>
>



Nov 19 '05 #6
Ok I can get a program to fire off but I can't pass it parameters. Sorry I
don't have any experience in this arena and I'm struggling at best. Is
there a way to start up a program and have parameters to go with it? When I
build the filename with parameters it breaks when I run without parameters
it works.
Thanks for your advice
--

Paul Bergson

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:O3**************@TK2MSFTNGP10.phx.gbl...
OIC, well you still may be having permission issues. Make sure the ASPNET
user account has permission to access the file, or use impersonation to have it run under another user account.
And you probably shouldn't be using scripting. This is ASP.NET and there
are better ways, such as the Process namespace:

Dim csc As System.Diagnostics.Process = New System.Diagnostics.Process()
csc.StartInfo.FileName = "c:\SomePath\MyCommandLineApp.exe"
csc.Start()

Here's more info:
http://msdn.microsoft.com/library/de...starttopic.asp
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"Paul Bergson" <pb******@mnpower.com> wrote in message
news:Ol**************@TK2MSFTNGP14.phx.gbl...
I'm trying to get this to run on the server side. Should have nothing to
do
with the client

--

Paul Bergson

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:#Y**************@TK2MSFTNGP09.phx.gbl...
Web pages do not have this level of security permissions by default.
If web pages could run anything they wanted on a users machine, that
would
be quite a security hole, don't you think?
You can only get this to work in IE if each browser has customized

security
options that allow it to work.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Paul Bergson" <pb******@mnpower.com> wrote in message
news:OO**************@TK2MSFTNGP12.phx.gbl...
> I'm trying to start up a command from inside my asp code to modify
> permissions on folders. When I do I get the error
>
> Microsoft VBScript runtime error '800a01a8'
>
> Object required: ''
>
> /newuser.asp, line 120
>
>
>
> Line 120 is the WshShell.Run strWShell This works fine in vb
> script.
> I'm not very savvy with asp so I'm unclear as to why I'm getting this
> error?
>
>
> 'Create Folder Skeleton
>

'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''
> '''''
> ''''''''''''''''''''''''''''''
> ''''''''''''''''''''''''''''''
>

'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''
> '''''
> Set FS = CreateObject("Scripting.FileSystemObject")
> Set WSHNetwork = CreateObject("WScript.Network")
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
>
>
>
> FS.CreateFolder(ParentDir & strName)
> 'Build Domain Admins
>
> On Error Goto 0
>
> strWShell = "\\admin04\bin\xcacls " & ParentDir & strName & " /G " &
> txtQuote & "GOB\Domain Admins" & txtQuote & ":F /Y"
> WshShell.Run strWShell
>
>
> Any help is appreciated.
> --
>
> Paul Bergson
>
>



Nov 19 '05 #7
You specify command line parameters with the Arguments property.
Here's more info:
http://msdn.microsoft.com/library/de...mentstopic.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Paul Bergson" <pb******@mnpower.com> wrote in message
news:uU**************@TK2MSFTNGP12.phx.gbl...
Ok I can get a program to fire off but I can't pass it parameters. Sorry
I
don't have any experience in this arena and I'm struggling at best. Is
there a way to start up a program and have parameters to go with it? When
I
build the filename with parameters it breaks when I run without parameters
it works.
Thanks for your advice
--

Paul Bergson

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:O3**************@TK2MSFTNGP10.phx.gbl...
OIC, well you still may be having permission issues. Make sure the
ASPNET
user account has permission to access the file, or use impersonation to

have
it run under another user account.
And you probably shouldn't be using scripting. This is ASP.NET and there
are better ways, such as the Process namespace:

Dim csc As System.Diagnostics.Process = New System.Diagnostics.Process()
csc.StartInfo.FileName = "c:\SomePath\MyCommandLineApp.exe"
csc.Start()

Here's more info:

http://msdn.microsoft.com/library/de...starttopic.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net


"Paul Bergson" <pb******@mnpower.com> wrote in message
news:Ol**************@TK2MSFTNGP14.phx.gbl...
> I'm trying to get this to run on the server side. Should have nothing to > do
> with the client
>
> --
>
> Paul Bergson
>
> "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
> news:#Y**************@TK2MSFTNGP09.phx.gbl...
>> Web pages do not have this level of security permissions by default.
>> If web pages could run anything they wanted on a users machine, that
>> would
>> be quite a security hole, don't you think?
>> You can only get this to work in IE if each browser has customized
> security
>> options that allow it to work.
>>
>> --
>> I hope this helps,
>> Steve C. Orr, MCSD, MVP
>> http://SteveOrr.net
>>
>>
>> "Paul Bergson" <pb******@mnpower.com> wrote in message
>> news:OO**************@TK2MSFTNGP12.phx.gbl...
>> > I'm trying to start up a command from inside my asp code to modify
>> > permissions on folders. When I do I get the error
>> >
>> > Microsoft VBScript runtime error '800a01a8'
>> >
>> > Object required: ''
>> >
>> > /newuser.asp, line 120
>> >
>> >
>> >
>> > Line 120 is the WshShell.Run strWShell This works fine in vb
>> > script.
>> > I'm not very savvy with asp so I'm unclear as to why I'm getting
>> > this
>> > error?
>> >
>> >
>> > 'Create Folder Skeleton
>> >
> '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''' >> > '''''
>> > ''''''''''''''''''''''''''''''
>> > ''''''''''''''''''''''''''''''
>> >
> '''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''''''''''''''''''' >> > '''''
>> > Set FS = CreateObject("Scripting.FileSystemObject")
>> > Set WSHNetwork = CreateObject("WScript.Network")
>> >
>> > Set WshShell = WScript.CreateObject("WScript.Shell")
>> >
>> >
>> >
>> > FS.CreateFolder(ParentDir & strName)
>> > 'Build Domain Admins
>> >
>> > On Error Goto 0
>> >
>> > strWShell = "\\admin04\bin\xcacls " & ParentDir & strName & " /G "
>> > &
>> > txtQuote & "GOB\Domain Admins" & txtQuote & ":F /Y"
>> > WshShell.Run strWShell
>> >
>> >
>> > Any help is appreciated.
>> > --
>> >
>> > Paul Bergson
>> >
>> >
>>
>>
>
>



Nov 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Mark DuPrey | last post by:
I've got a script in an ASP page that is supposed to extract certain files from a zip file, move them, create a new zip with the moved files and then make a self-extracting archive out of the new...
5
by: Niyazi | last post by:
Hi, I have an html page and I might be moving to asp.net page that contains a some kind of forum and string. It is kind of application form. User have to enter some (string) value into the...
0
by: Niyazi | last post by:
Hi all, This my aspx page first line of code. <%@ Page CodeBehind="index.aspx.vb" Language="vb" AutoEventWireup="false" Inherits="TB.index" %> Than inside head tag I have following script(s)...
3
by: david | last post by:
I have two questions to ask. Thank you for your any help. 1. I have a windows application App.exe which displays some kind of image file, like the Adobe viewer. The image files are stored in a...
4
by: uinoma | last post by:
I want to open notepad in fullscreen mode, but this script that I created can't do that. . When I open Windows Manager Task, the program is just run in background, not appeared on web server...
2
by: CrystalBlue | last post by:
I've got a silly little problem when I'm trying to map a drive using shell script. Basically, I need the program to open up to a specific folder on a shared server and throw a zip file onto it, then...
3
by: David Morgan | last post by:
Hello I have a problem somewhere and I cannot figure it out, whatever I do the return code I get from trying to run a VBS from an ASP page via the WSH Shell object, always returns 1. I don't...
0
AnuSumesh
by: AnuSumesh | last post by:
Hi All, I want to get MAC address of client machine. I am using folllowing code in asp using vbscript: Set objWshShell = Server.CreateObject("WScript.Shell") strToExec = "nbtstat -a " &...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
marktang
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,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.