View unanswered posts | View active topics It is currently 31 Oct 2014 13:09



Post new topic Reply to topic  [ 2 posts ] 
Show /Hide on Network 
Author Message

Joined: 15 Feb 2011 10:32
Posts: 4
Post Show /Hide on Network
I have the script as follows:
Quote:
@echo off
goto main
:main
cls
echo 1 Show on Network
echo 2 Hide on Network
echo 3 Exit
:choice
set /P C=[1,2,3]?
if "%C%"=="1" goto showit
if "%C%"=="2" goto hideit
if "%C%"=="3" goto exitit
:showit
net config server /hidden:no
:hideit
net config server /hidden:yes
:exitit
exit

So it can work well? :D


03 Mar 2012 01:51
Profile

Joined: 10 Feb 2012 02:20
Posts: 4330
Post Re: Show /Hide on Network
I haven't tested this but there are some fixes below.

Code:
@echo off
goto :main
:main
cls
echo 1 Show on Network
echo 2 Hide on Network
echo 3 Exit
:choice
set "C="
set /P C=[1,2,3]?
if not defined c goto :choice
if "%C%"=="1" goto showit
if "%C%"=="2" goto hideit
if "%C%"=="3" goto exitit
goto :main
:showit
net config server /hidden:no
goto :EOF
:hideit
net config server /hidden:yes
goto :EOF
:exitit
exit
goto :EOF


03 Mar 2012 05:08
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], stanian, Yahoo [Bot] and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Forum style by Vjacheslav Trushkin for Free Forums/DivisionCore.