Sign in to follow this  
Followers 0
Ese

add var to a run(@comspec...) command

3 posts in this topic

hey guys

what i want to do is this:

i want the script to ask me few Qs, then take the values from the Qs and put it in a cmd command

the cmd command syntax is:

makecoll.exe <file> <collection> <server>

i want the <file> and <collection> values to be added with the input command by a user, is it possible?

i tried:

$file = InputBox("Script", "Enter File name and path(c:\filename.txt):", "")
$coll = InputBox("Script", "Enter the new collection name:", "")

Run(@ComSpec & "   /k c:\makecoll.exe "$file" "$coll" vmsmsprm -U:nasulin")

the script runs with no errors but the makecoll command uses $file and not the value it has in it... :S

cheers

Ese

Share this post


Link to post
Share on other sites



hey guys

what i want to do is this:

i want the script to ask me few Qs, then take the values from the Qs and put it in a cmd command

the cmd command syntax is:

makecoll.exe <file> <collection> <server>

i want the <file> and <collection> values to be added with the input command by a user, is it possible?

i tried:

$file = InputBox("Script", "Enter File name and path(c:\filename.txt):", "")
 $coll = InputBox("Script", "Enter the new collection name:", "")
 
 Run(@ComSpec & "   /k c:\makecoll.exe "$file" "$coll" vmsmsprm -U:nasulin")

the script runs with no errors but the makecoll command uses $file and not the value it has in it... :S

cheers

Ese

$file = InputBox("Script", "Enter File name and path(c:\filename.txt):", "")
 $coll = InputBox("Script", "Enter the new collection name:", "")
 
 Run(@ComSpec & '   /k c:\makecoll.exe "' & $file & '" "' & $coll & '" vmsmsprm -U:nasulin')

Share this post


Link to post
Share on other sites

Thanks alot for the quick answer

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