Jump to content

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


Ese
 Share

Recommended Posts

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

Link to comment
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')
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...