Scripts Thread, my "check if S: exsists if not remap it then sun runs" in Coding and Web Development; Just thought id let you guys have this.
We had problems with wifi users loosing their mapped drives if they ...
-
5th April 2007, 12:44 PM #1
- Rep Power
- 0
my "check if S: exsists if not remap it then sun runs"
Just thought id let you guys have this.
We had problems with wifi users loosing their mapped drives if they went out of range.
This script checks if the S: exists
if it does it just runs sims
if it doesnt it remaps the s: and then runs sims
if it can remap the s: it displays a warning saying "your not in wifi range"
I put a shortcut to this on the desktop and gave it the sims.net icon
You will need to copy and paste this into a text file with a vbs extension and change the first line to point to your sims server.
-------------copy after here--------------
simsServer = "\\simsserver\adapps$"
'Setup Wscript object
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim fso, msg
Set fso = CreateObject ("Scripting.FileSystemObject")
If fso.FileExists("s:\SIMS\connect.ini") Then
msg = "s drive exists."
Else
Return = WshShell.Run("cmd /c net use s: " & SimsServer,0,True)
End If
If fso.FileExists("s:\SIMS\connect.ini") Then
command = "cmd /c ""C:\Program Files\SIMS\SIMS .net\Pulsar.exe"""
Return = WshShell.Run(command,0,TRUE)
Else
MsgBox("Error: You are not connected to the Wireless network." & VbCrLf & vbCrLf & "Please move nearer to a
wireless access point and restart you pc." & VbCrLf & "You will then be able to use Sims.net")
End If
---------paste into a text file with a vbs extension-------------
-
-
IDG Tech News
SHARE: 
Similar Threads
-
By dustmite in forum *nix
Replies: 31
Last Post: 30th June 2008, 10:03 AM
-
By tarquel in forum Gaming
Replies: 7
Last Post: 19th June 2007, 08:34 AM
-
Replies: 6
Last Post: 28th September 2006, 07:06 PM
-
Replies: 2
Last Post: 13th June 2006, 09:22 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules