Environmental variable 
Author Message
 Environmental variable

I am writing a WSH logon script using VBScript.  I'm new to WSH.  I have a
very simply logon script which simply map drives.  However there is one line
that checks for a value of an environmental variable set via the
autoexec.bat file in the windows 95 workstations:  The line goes like this:

IF "%CULVER%" == "YES" NET USE K: \\NSBN_GK\APPS /YES

My question is, how do you translate this line to WSH VBScript?

Thank you

Angel



Sun, 18 May 2003 03:00:00 GMT  
 Environmental variable
ExpandEnvironmentStrings Method
http://msdn.microsoft.com/scripting/windowshost/doc/wsMthExpandEnviro...

or

WshEnvironment Object
http://msdn.microsoft.com/scripting/windowshost/doc/wsObjWshEnvironme...

plus

RemoveNetworkDrive Method
http://msdn.microsoft.com/scripting/windowshost/doc/wsMthRemoveNetwor...
MapNetworkDrive Method
http://msdn.microsoft.com/scripting/windowshost/doc/wsMthMapNetworkDr...

The docs are all online (the .htm links) and downloadable (the .exe links)...

WSH Documentation
http://msdn.microsoft.com/scripting/windowshost/docs/reference/defaul...
http://msdn.microsoft.com/scripting/windowshost/wshdoc.exe

VBScript Documentation
http://msdn.microsoft.com/scripting/vbscript/techinfo/vbsdocs.htm
http://msdn.microsoft.com/scripting/vbscript/download/vbsdoc.exe

FileSystemObject User's Guide
http://msdn.microsoft.com/scripting/vbscript/doc/jsFSOTutor.htm
VBScript Run-Time Reference
http://msdn.microsoft.com/scripting/vbscript/doc/vbsfsotoc.htm

JScript Documentation
http://msdn.microsoft.com/scripting/jscript/techinfo/jsdocs.htm
http://msdn.microsoft.com/scripting/jscript/download/jsdoc.exe

WSC Documentation
http://msdn.microsoft.com/scripting/scriptlets/serverdocs.htm
http://msdn.microsoft.com/scripting/scriptlets/wscdoc.exe

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> I am writing a WSH logon script using VBScript.  I'm new to WSH.  I have a
> very simply logon script which simply map drives.  However there is one line
> that checks for a value of an environmental variable set via the
> autoexec.bat file in the windows 95 workstations:  The line goes like this:

> IF "%CULVER%" == "YES" NET USE K: \\NSBN_GK\APPS /YES

> My question is, how do you translate this line to WSH VBScript?

> Thank you

> Angel



Sun, 18 May 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Adding Environmental Variable to System Variables thru VB

2. Run OS Commans With Environmental Variables ?

3. setting environmental variable

4. Environmental Variable

5. Environmental Variable for users Full Name?

6. Passing Environmental %1

7. passing javascript variable into asp variable using vbscript

8. Object variable or With block variable not set (Error 91)

9. Object variable or With Block variable not set

10. Splitting Session Variable into several variables (array?)

11. Largest Variable for the Long variable type

12. Redirection Problem (VBScript variable to JavaScrip variable)

 

 
Powered by phpBB® Forum Software