Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, beginner here,
let computer = ComputerName();
If $(computer) = $(computer) then
Set vDrive = a;
else
Set vDrive = b;
end if
I am using this " If $(computer) = $(computer) ", because I know it will equal, expecting the IF statement to go to Set vDrive = a;
but the code keeps going to Set vDrive = b; not sure what is going on, any help is extremely appreciated.
Hi
Try like this
let computer = ComputerName();
If '$(computer)' = '$(computer)' then
Set vDrive = a;
else
Set vDrive = b;
end if
Try If $(computer) = '$(computer)' - note the apostrophes added.
Hi
If you use a $ expansion, you will need to put this in quotes. But in this case, you don't need a $ expansion, for example:
If vComputer = vComputer2 Then
....
End If
HTH
Jonathan
Hi
Try like this
let computer = ComputerName();
If '$(computer)' = '$(computer)' then
Set vDrive = a;
else
Set vDrive = b;
end if