G-tek Posted February 9, 2016 Share Posted February 9, 2016 Hi Thank you for looking My issue is between $input and $2input. the ELSE (line 8). i can't get it to set in the to out puts of the inputbox's in line 15 with fileexists and line 24 (runwait). It works great with one inputbox command but can't get it to work with to input's. Quote Func SP7() Local $iLoop = 1 While $iLoop = 1 $input = InputBox("Install With P Licens", "Enter module name" & @CRLF & "" & @CRLF & " f. eks. Si22" & @CRLF & " Don't add .gho/_7p64_") If @error = 1 Then MsgBox(0x0,"You Pressed Cancel", "Reture to main menu - pressed 'OK'") Return _main Else $2input = InputBox("Choose which Customer", "Enter name for customers image" & @CRLF & "" & @CRLF & " f. eks. Scala/combine/WZF" & @CRLF & " Don't add .gho/_7p64_") If @error = 1 Then MsgBox(0x0,"You Pressed Cancel", "Reture to main menu - pressed 'OK'") Return _main Else if $input = FileExists("\\10.0.1.17\public\teknik_images\ibase\" & $input & "\" & $input & "_7p64_" & $2input & ".gho") Then MsgBox(0x5,"Error", "File name doesn't exist" & @CRLF & "Or"& @CRLF & "Network connection is missing" & @CRLF & "Else" & @CRLF & "Examine path: \\STORAGE\Public\Teknik_Images\ibase") Else $iLoop = 0 EndIf EndIf EndIf WEnd RunWait(@ComSpec & " /C " & 'Ghost64.exe -clone,mode=restore,src=\\10.0.1.17\public\teknik_images\ibase\'& $input &'\'& $input &'_7p64_'& $2input &'.gho,dst=1 -sure -auto',"") Exit ; Return _main EndFunc Many thanks \\Gabriel. Link to comment Share on other sites More sharing options...
Radiance Posted February 9, 2016 Share Posted February 9, 2016 if $input = FileExists("\\10.0.1.17\public\teknik_images\ibase\" & $input & "\" & $input & "_7p64_" & $2input & ".gho") Then You are comparing the value of $input to the return value of FileExists. While FileExists returns either 0 or 1, $input will be whatever the user typed into the first InputBox. Unless the user actually enters 1 or 0 this can never match. Link to comment Share on other sites More sharing options...
G-tek Posted February 11, 2016 Author Share Posted February 11, 2016 Thanks. it make sense. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now