473,480 Members | 4,841 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Running Net Stop

I want to make a simple simple asp page. All I want is when the page loads
it does "net stop <service>". The code is below, it is not running as
IUSR_<machine>, I am authenticating as Administrator yet the service does
not stop. The blank page just loads with no errors and the service remains
running, what am I missing? I am completely new to ASP, I just want one
simple page for this purpose.

<HTML>
<TITLE>Test</TITLE>
<BODY>
<%
set wshell = server.createobject("wscript.shell")
wshell.run "net stop testservice"
set wshell = nothing
%>

</BODY>
</HTML>

Thank you
Ketta
Jul 19 '05 #1
5 5041
Well,
I guess it is still running as IUSR_ because I cannot even get a
directory output of C:\. How can I make this run as another user?

Thanks

"Ketta" <no@post.net> wrote in message
news:uB****************@TK2MSFTNGP12.phx.gbl...
I want to make a simple simple asp page. All I want is when the page loads it does "net stop <service>". The code is below, it is not running as
IUSR_<machine>, I am authenticating as Administrator yet the service does
not stop. The blank page just loads with no errors and the service remains running, what am I missing? I am completely new to ASP, I just want one
simple page for this purpose.

<HTML>
<TITLE>Test</TITLE>
<BODY>
<%
set wshell = server.createobject("wscript.shell")
wshell.run "net stop testservice"
set wshell = nothing
%>

</BODY>
</HTML>

Thank you
Ketta

Jul 19 '05 #2
Place the ASP page in an application with anonymous disabled, and windows
auth enabled, then connect to the ASP page and authenticate using a
username/password on the machine/domain that has the ability to execute the
task(s)...

"Ketta" <no@post.net> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
Well,
I guess it is still running as IUSR_ because I cannot even get a
directory output of C:\. How can I make this run as another user?

Thanks

"Ketta" <no@post.net> wrote in message
news:uB****************@TK2MSFTNGP12.phx.gbl...
I want to make a simple simple asp page. All I want is when the page

loads
it does "net stop <service>". The code is below, it is not running as
IUSR_<machine>, I am authenticating as Administrator yet the service does not stop. The blank page just loads with no errors and the service

remains
running, what am I missing? I am completely new to ASP, I just want one
simple page for this purpose.

<HTML>
<TITLE>Test</TITLE>
<BODY>
<%
set wshell = server.createobject("wscript.shell")
wshell.run "net stop testservice"
set wshell = nothing
%>

</BODY>
</HTML>

Thank you
Ketta


Jul 19 '05 #3
Thanks, I tried that and still the service remains running. The command I
am issuing is correct, I have no idea. Thanks for the help though, it is
probably frustrating dealing with someone like myself who just wants one
small thing and cannot really contribute back to the community.

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
Place the ASP page in an application with anonymous disabled, and windows
auth enabled, then connect to the ASP page and authenticate using a
username/password on the machine/domain that has the ability to execute the task(s)...

"Ketta" <no@post.net> wrote in message
news:Oh**************@tk2msftngp13.phx.gbl...
Well,
I guess it is still running as IUSR_ because I cannot even get a
directory output of C:\. How can I make this run as another user?

Thanks

"Ketta" <no@post.net> wrote in message
news:uB****************@TK2MSFTNGP12.phx.gbl...
I want to make a simple simple asp page. All I want is when the page

loads
it does "net stop <service>". The code is below, it is not running as
IUSR_<machine>, I am authenticating as Administrator yet the service does not stop. The blank page just loads with no errors and the service

remains
running, what am I missing? I am completely new to ASP, I just want one simple page for this purpose.

<HTML>
<TITLE>Test</TITLE>
<BODY>
<%
set wshell = server.createobject("wscript.shell")
wshell.run "net stop testservice"
set wshell = nothing
%>

</BODY>
</HTML>

Thank you
Ketta



Jul 19 '05 #4
I use this and it works fine. This is in an authenticated directory as
Aaron suggests.

Dim oShell
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run "cmd.exe /c net start winvnc", 0, True
Set oShell = Nothing

Ray at home
"Ketta" <no@post.net> wrote in message
news:um**************@TK2MSFTNGP12.phx.gbl...
Thanks, I tried that and still the service remains running. The command I
am issuing is correct, I have no idea. Thanks for the help though, it is
probably frustrating dealing with someone like myself who just wants one
small thing and cannot really contribute back to the community.

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
Place the ASP page in an application with anonymous disabled, and windows auth enabled, then connect to the ASP page and authenticate using a
username/password on the machine/domain that has the ability to execute

the
task(s)...


Jul 19 '05 #5
If only that worked. There must be something horribly wrong with my access
control on that directory. It is so straight forward that the problem has
to be something silly. Thanks for the help.

"Ray at <%=sLocation%>" <myfirstname at lane 34 . komm> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
I use this and it works fine. This is in an authenticated directory as
Aaron suggests.

Dim oShell
Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run "cmd.exe /c net start winvnc", 0, True
Set oShell = Nothing

Ray at home
"Ketta" <no@post.net> wrote in message
news:um**************@TK2MSFTNGP12.phx.gbl...
Thanks, I tried that and still the service remains running. The command I
am issuing is correct, I have no idea. Thanks for the help though, it is probably frustrating dealing with someone like myself who just wants one
small thing and cannot really contribute back to the community.

"Aaron Bertrand [MVP]" <aa***@TRASHaspfaq.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
Place the ASP page in an application with anonymous disabled, and windows auth enabled, then connect to the ASP page and authenticate using a
username/password on the machine/domain that has the ability to

execute the
task(s)...



Jul 19 '05 #6

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

Similar topics

0
528
by: Rick | last post by:
I am trying to stop the screen saver from running based on a external trigger from our application. I have a .Net application and I am using interop to make a SystemParameterInfo() call to...
1
2291
by: Dan | last post by:
Good Day, I have a Windows Service that is responsible for processing somes files. One method of the service invokes another method which may take a while to complete its work. Something like...
2
3739
by: trint | last post by:
Ok, I click on 'exit' and have it calling (function is started in new thread): this.m_notifyicon.Dispose(); Application.Exit(); or this.Close(); And TaskManager shows it still running!
7
2561
by: MgGuigg | last post by:
Hello all, This is my first time posting a question to this forum, so here is hoping I am following protocol. I am scraping the rust off my old Basic programming skills, and have just recently...
3
1457
by: Kevin L | last post by:
How do I check to see if a particular service is running?
2
1471
by: UJ | last post by:
I am writing an automatic download process that will update software on a computer. We've got services that run all of the time and a couple of programs that run all of the time. How can I tell if...
4
4152
by: tshad | last post by:
What would be a good way to check programmatically whether a service was running? We have a service that dies periodically and I need to check to see if this service is running. I know how to...
2
10182
by: Lloyd Sheen | last post by:
While using VS 2005 Pro I get this about 50% of the time. I run the app. See whats wrong. Stop the app (stop debugging button). Make changes and then click the start debugging button. If I...
33
11574
by: Sunny | last post by:
Hi, Sometime, when your script is too big, IE Gives you a warning "Stop Running This Script" A script on this page is causing Internet Explorer to run slowly. Does anyone knows, How to...
0
6905
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
7041
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,...
1
6736
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
6908
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...
1
4772
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4478
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...
0
2994
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...
0
2980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
178
bsmnconsultancy
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...

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.