Jump to content
Sign in to follow this  
Alexandre

System Vars

Recommended Posts

Alexandre

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
Alexandre

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
omikron48

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
99ojo

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.