slb2008
asked on
Asp.Net State Service Batch File
Dear experts-exchange,
I would like to know how to create a batch file for the ASP.NET State Service, since I don’t want to login to a remote server, to go the administrative tools, services and later re-start the asp.net state service all the time . That’s a long way to navigate to another server. I want to have a shortcut batch file in my local pc, so if ASP.net State Service stops, I just click the shortcut and the asp.net state service will re-start without go to another server. Your assistance and help is appreciated.
Sample batch file like this:
Path remote server ?
net stop "ASP.NET State Service"
net start "ASP.NET State Service"
sc config ????? start= auto
Thanks.
I would like to know how to create a batch file for the ASP.NET State Service, since I don’t want to login to a remote server, to go the administrative tools, services and later re-start the asp.net state service all the time . That’s a long way to navigate to another server. I want to have a shortcut batch file in my local pc, so if ASP.net State Service stops, I just click the shortcut and the asp.net state service will re-start without go to another server. Your assistance and help is appreciated.
Sample batch file like this:
Path remote server ?
net stop "ASP.NET State Service"
net start "ASP.NET State Service"
sc config ????? start= auto
Thanks.
You need to use PowerShell. It's free from Microsoft and built into Windows 2008 or Windows 7 but has to be installed in older operating systems. Search the web for PowerShell script sites. There are LOTS
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
then goto your desktop and create shortcut file.
in the path add the following:
C:\Windows\System32\cscrip t.exe <script_location>
in the path add the following:
C:\Windows\System32\cscrip
shortcut properties...
shortcut.jpg
shortcut.jpg
ASKER
Thanks sedgwick for the script and shortcut properties, but where I will insert your script? Do I need to create a new vb.net file?
ASKER
tedbilly,
Thanks for your comment. I am familiar with PowerShel, but I don't use the PowerShell very much. I'll check for the PowerShell scripts. Thanks.
Thanks for your comment. I am familiar with PowerShel, but I don't use the PowerShell very much. I'll check for the PowerShell scripts. Thanks.
ASKER
sedgwick:
Sorry I didn't reply you sooner, but I can tell you I create vbs script file using notepad and save the file as remote_proc.vbs on c:\vbs folder and later I created a new shortcut. Your script and RemoteRestart Properties worked really well. After created the shortcut on the desktop I clicked it from my machine with good results, so I don't need to login to another server to restart the asp.net service. Thanks for your help. I appreciated it and you will get 500 points.
slb2008
Sorry I didn't reply you sooner, but I can tell you I create vbs script file using notepad and save the file as remote_proc.vbs on c:\vbs folder and later I created a new shortcut. Your script and RemoteRestart Properties worked really well. After created the shortcut on the desktop I clicked it from my machine with good results, so I don't need to login to another server to restart the asp.net service. Thanks for your help. I appreciated it and you will get 500 points.
slb2008