473,379 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

ExpandEnvironmentStrings

Hi
Know how to get Environment paramaters through vbscript
Set WshShell = WScript.CreateObject("WScript.Shell")
strHomeshare = WshShell.ExpandEnvironmentStrings("%HOMESHARE%")

I'm trying to get the same value in VB using the following function but
can't figure out how to use it :

Private Declare Function ExpandEnvironmentStrings Lib "kernel32" Alias
"ExpandEnvironmentStringsA" (ByVal lpSrc As String, ByVal lpDst As
String, ByVal nSize As Long) As Long

Help please.

Nov 21 '05 #1
1 7297
"Franck" <we**********@gmail.com> schrieb:
Know how to get Environment paramaters through vbscript
Set WshShell = WScript.CreateObject("WScript.Shell")
strHomeshare = WshShell.ExpandEnvironmentStrings("%HOMESHARE%")

I'm trying to get the same value in VB using the following function but
can't figure out how to use it :


Use 'Environment.ExpandEnvironmentVariables' instead.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Ghazan Haider | last post by:
I am posting this for the lack of a better newsgroup, and for the knowledge of people here, and because its only partially OT. We have a bunch of users with their computers at work. There are...
2
by: Patrick L. Nolan | last post by:
I'm trying to find a clean way to launch a Wordpad editor on Windows. By "clean", I mean that it should work on as many versions of Windows as possible, and it shouldn't require installing any...
10
by: Raptor | last post by:
I am trying to perform the following task. I believe it is possible from other asp pages I have seen before. I have a server (ServerA) Win2003 IIS 6 running a web page I have a server (ServerB)...
5
by: Leszek | last post by:
Hello gurus! I wrote a code in VBS, that will check, that current user is in one from three groups. But i don't know how asimilate it with asp.net. This page will be a bridge between 2 - main...
0
by: rth | last post by:
I need to read the Security Event Log and then show the EVENTLOGRECORD as a String. Reading records works fine but when I format the string that I'm going to show the FormatMessage function...
0
by: SLE | last post by:
Hi there, On the ASPX form, the user should enter his/her computername. I want this TextBox to have a default value, determined from the local environment variable %ComputerName%. So I wrote...
3
by: vpascuzzi | last post by:
Hello all, My first post as a SysAdmin (I am more used to C* programming). What I am trying to do is create a script that will scan PCs on my network and check for a file and verify that it's...
2
by: kevinr | last post by:
Hi, I am brand new to VB, and I am trying to deploy Office 2007 on my network here at work. We used part of this script to do another deployment, and I have taken pieces and tried to edit for this...
6
AR Ratheesh
by: AR Ratheesh | last post by:
Hi guys, can you help me to create my mdb file shortcut in desktop using code...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.