专注于互联网--专注于架构

最新标签
网站地图
文章索引
Rss订阅

首页 »DotNet » cmd代码:aspx页面通过代码调用cmd来运行注册服务 »正文

cmd代码:aspx页面通过代码调用cmd来运行注册服务

来源: 发布时间:星期三, 2008年9月10日 浏览:100次 评论:0
之前不是写了windows服务吗,需要向系统注册服务,但是我只有ftp权限怎么办,不能远程到桌面。

想了个办法,写了一个aspx页面,通过代码调用cmd来运行。当然,因为服务器安全放的比较开,内网吗~

下面代码

view plaincopy to clipboardprint?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CMD.aspx.cs" Inherits="Test_CMD" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">



<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>无标题页</title>

</head>

<body>

<form id="form1" runat="server">

<div>

<asp:Label ID="Label1" runat="server" Text="目录:"></asp:Label>

<asp:TextBox ID="TextBox3" runat="server" Width="549px">c:\\</asp:TextBox>

<br />

<asp:TextBox ID="TextBox1" runat="server" Height="113px" TextMode="MultiLine" Width="600px"></asp:TextBox>

<br />

<asp:Button ID="Button1" runat="server" _disibledevent="code">轻松搞定。
</PRE>

如果本文没有解决您的问题,请进老妖怪开发者社区提问

相关文章

读者评论

  • 共0条 分0页

发表评论

  • 昵称:
  • 内容: