Link to home
Create AccountLog in
Avatar of smart Z
smart Z

asked on

Can I have a vbscript

I have this batch file but I want to change it to vbscript

@echo off
Set ESRI_Software_class=editor
"c:\program files (x86)\Arcgis\desktop10.0\armap.exe
Avatar of Noduzz
Noduzz

It looks like you want to set an environment variable please see this page on setting environments variables:
http://www.robvanderwoude.com/vbstech_data_environment.php
Avatar of smart Z

ASKER

I m not writing any environmental variable just reading
Avatar of smart Z

ASKER

I m not writing any environmental variable just reading
Sorry right i just noticed that, well the link has info on reading as well.
Hi, in a not so pure VBS way, you can just to this.

Regards,

Rob.
Set objShell = CreateObject("WScript.Shell")
objShell.Run "cmd /c Set ESRI_Software_class=editor", 0, True
objShell.Run "c:\program files (x86)\Arcgis\desktop10.0\armap.exe", 1, False

Open in new window

Avatar of smart Z

ASKER

RobSamson,

It does not work. I get an error
 User generated image
Avatar of smart Z

ASKER

On another thought how can I have the vbs just recall the batch file. Lets say the batch file is on C:\test.bat

and I want the this vbs to run the batch file.
ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of smart Z

ASKER

Excellent