Sign in to follow this  
Followers 0
Alexandre

System Vars

4 posts in this topic

Hello

I need some help for this.

I just set a system var to machine like Var Server value teste

And i need a scritp that map a network drive like this

runwait ("I:", "\\%server%\cid") and i'm stuck one this.

Any help

Share this post


Link to post
Share on other sites



Sry

Hello

I need some help for this.

I just set a system var to machine like Var Server value teste

And i need a scritp that map a network drive like this

mapdriveadd ("I:", "\\%server%\cid") and i'm stuck one this.

Any help

Share this post


Link to post
Share on other sites

You can use the "net use" command in Windows to map network shares to drive letters. link

Using that, you can just make a function that plugs in the values you want in a "net use" call.

Share this post


Link to post
Share on other sites

Hi,

this should work:

;Get environment variable %server%
$server = EnvGet ("Server")
; if %server% = teste
DriveMapAdd ("I:", "\\" & $server & "\cid")

;-))

Stefan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0