hispeed_mike Posted January 25, 2007 Share Posted January 25, 2007 Hi,I am trying to include a variable into a network path that is declared in my script.First an Input box appears and asks for a computer nameThen the file that needs to be accessed Uses this variable along with the rest of the path that is static.$compname = InputBox("Computer Name", "Computer Name:", "", "")If $compname = 1 Then ExitElse $compname = 0$file1 = "\\Need to Declare the variable Here\Folder_Name\Clean Install\Location.txt"Thanks in advanceMike Link to comment Share on other sites More sharing options...
Psibernetic Posted January 25, 2007 Share Posted January 25, 2007 (edited) $compname = InputBox("Computer Name", "Computer Name:") $file1 = "\\" & $compname & "\Folder_Name\Clean Install\Location.txt" ...I am not sure why u had that if statement.. Edited January 25, 2007 by Psibernetic [sup]Psibernetic[/sup]My Creations:X-HideSecuracy Link to comment Share on other sites More sharing options...
hispeed_mike Posted January 25, 2007 Author Share Posted January 25, 2007 Thanks for that... There is a heap more code after this that relies on the If statement in the little snippet I posted. Thanks for your heads up though... Mike $compname = InputBox("Computer Name", "Computer Name:") $file1 = "\\" & $compname & "\Folder_Name\Clean Install\Location.txt" ...I am not sure why u had that if statement.. Link to comment Share on other sites More sharing options...
Psibernetic Posted January 25, 2007 Share Posted January 25, 2007 Thanks for that...There is a heap more code after this that relies on the If statement in the little snippet I posted.Thanks for your heads up though...MikeWhat had confusedd me was that u set the variable $compname to 0 if it didnt equal one.... which perty much eliminated the purpose of the inputbox... [sup]Psibernetic[/sup]My Creations:X-HideSecuracy 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