Page 1 of 1 1
Topic Options
#156981 - 2006-02-09 08:51 PM Hide Network Drive?
wicks Offline
Lurker

Registered: 2006-01-26
Posts: 4
I need to map a network drive but have it hidden when you click on my computer. Any ideas on how to do this?

also .. there are a bunch of commands that when run i don't want the results to be displayed?

thanks for all your help!

Top
#156982 - 2006-02-09 08:54 PM Re: Hide Network Drive?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
you are pretty SOL hiding the network drive... would UNC be sufficient

be more specific about the commands whose output you want to suppress
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#156983 - 2006-02-09 09:01 PM Re: Hide Network Drive?
wicks Offline
Lurker

Registered: 2006-01-26
Posts: 4
I just have a bunch of commands that at the start of the script delete previously used drives as listed below:

Run "NET USE W: /delete"
Run "NET USE Z: /delete"
Run "NET USE M: /delete"
DELPRINTERCONNECTION("\\AVCS-SV01\G1_4050N_190")
DELPRINTERCONNECTION("\\AVCS-SV01\G5_M5200N_192")

but sometimes there is no drive to delete, and it displays an error ... soo i just want these commands to run but so that they are not displayed on the window?

sorry if i am not explaining myself well .. i am new to this. thanks!

Top
#156984 - 2006-02-09 09:04 PM Re: Hide Network Drive?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Why can't you hide it? GPO and TweakUI can.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156985 - 2006-02-09 09:05 PM Re: Hide Network Drive?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
USE W: /delete
USE Z: /delete
USE M: /delete
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#156986 - 2006-02-09 09:07 PM Re: Hide Network Drive?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If you don't want an error thrown when trying to delete an non existent drive, check for its existence first. Better still, why go to DOS for the NET command when KiX has the USE command.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156987 - 2006-02-09 09:13 PM Re: Hide Network Drive?
wicks Offline
Lurker

Registered: 2006-01-26
Posts: 4
I agree LES ... like I said I am still figuring this out, so I learned something lol. thanks again for your help! the USE command worked great!
Top
#156988 - 2006-02-09 09:17 PM Re: Hide Network Drive?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
You may want to add the /Persistent switch for good measure.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156989 - 2006-02-09 09:21 PM Re: Hide Network Drive?
wicks Offline
Lurker

Registered: 2006-01-26
Posts: 4
what does /persistent do?

and ... i know what tweakUI is .. what is GPO?

Top
#156990 - 2006-02-09 09:27 PM Re: Hide Network Drive?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
GPO = Group Policy Object
The /Persistent switch will delete the drive even if it was mapped as persistent.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156991 - 2006-02-09 09:42 PM Re: Hide Network Drive?
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Hi wicks,
welcome to the board, i think that Les and Rad are saying try something like this:
Code:
Select
Case Exist("M:")
Use M: /Del /persistent
Case Exist("W:")
Use W: /Del /persistent
Case Exist("Z:")
Use Z: /Del /persistent
EndSelect





Edited by benny69 (2006-02-09 09:43 PM)
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#156992 - 2006-02-09 09:45 PM Re: Hide Network Drive?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I would not opt for a Select Case construct though since it is mutually exclusive. IF constructs would be better.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#156993 - 2006-02-09 10:08 PM Re: Hide Network Drive?
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
Oh, good point Les:
Code:
If Exist("M:")
Use M: /Del /persistent
EndIf
If Exist("W:")
Use W: /Del /persistent
EndIf
If Exist("Z:")
Use Z: /Del /persistent
EndIf

_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#156994 - 2006-02-10 02:12 AM Re: Hide Network Drive?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
Or look at my MapDrive() UDF
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.078 seconds in which 0.035 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org