Question Locked

forcing connection to hidden network share on a wireless network

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
we have student labs in several locations. the software the students run looks for its components on a hidden share on a NAS unit. (we hide the share so the students don't see, explore and damage the folders and files.) never a problem, until we installed a new lab using wireless laptops. when the software starts in the wireless environment, we get a "server not found" error. since the share is hidden, the students can't go to network places and force the connection. the problem can be solved by running another application, which connects the share, but it's confusing to tell the students to run program B first in order to run program A. how can we force a connection to the hidden share?

5 replies

by faradhi

We use a program called colligo to network when my users are in the field. The problem with colligo is that it conflicts with our wireless configuration utility. It uses the builtin wireless configuration utility. I had to disable our utility and the associated services before launching colligo. Well, that just was not going to happen with our users.

My solution was to create a script that disables everything and then launches colligo for them. Then I replaced the shortcut that has the same icon as the original program with one that launches the script. The users were none the wiser.

To do this, here are the steps I suggest to follow.

- Copy the shortcut for Program A and Program B to a folder on the root of C: that the students have only read and execute rights.

- Create a VBScript with the contents below.

Option Explicit

Dim objWShell, strCmd1, strCmd2

strCmd1 = {enter path to program B's shortcut copied in the step above}
strCmd2 = {enter path to program A's shortcut copied in the step above}

Set objWShell = CreateObject("Wscript.Shell")
objWShell.Run strCmd1,1,0 'this launches program1
wscript.sleep 1000 'pauses execution to allow the program B time to run
objWShell.Run strCmd2,1,0 'this launches program2

- Create shortcut to the VBScript you created above. Change the Icon on the shortcut to the icon for Program B.

Your done. The reason I launch the Shortcut rather than the exe directly is that many programs require the run in option to be correct. I could find no way to pass that run in portion of the shortcut using VBScripts.

I hope this helps.
Bryan

edited to change desktop to root of C:

by smacdonald

i like this concept, but program B is overkill for forcing the network connection. it hits the NAS hard and requires a login. if we could find another program that would activate the connection to the hidden share, this method would work.

by faradhi

instead of the program B.

The code would go something like this:

Dim objNet
Set objNet = CreateObject("WScript.Network")
objNet.MapNetworkDrive "H:", "\\" & servername & "\" & sharename, , _
DomainName\UserName, Password

This of course will require the password to be placed in the script as plain text. The risk can be minimized if you have a program like primal script that will create an EXE from a vbscript.

I hope it helps.

Bryan

by gopal saini

As I have seen that the prob. is that if You want to access the network drive. then before that You are logging to that particular computer again and again. Am i right?
if i am the u can make a batch file with command " net use z:(means drive letter) \\server name\drive letter /user:administrator passowrd"
u have to mention the user name and password after the string "/user:" and separate the user name and password with a single space and save this batch file and put it in start up folder. when ur system would be opened, it will automatically connect ur network drive and You will be able to access this drive directly.
And that would be visible. If you want to make it invisible then Put "@echo off" before the command.

This discussion is closed to new replies.