MarcoTips Posted November 6, 2004 Share Posted November 6, 2004 is there some way? perhaps a script that reads the username or the name the computer is registered too and then decides if the name equals perhaps A, B or C, to install the app, if the name is D then it exits the script Link to comment Share on other sites More sharing options...
aresgodofwar Posted November 6, 2004 Share Posted November 6, 2004 sure. you can specify an If Then statement in a batch file. i haven't done it before, but i know that it can be done. search google for batch file information. Link to comment Share on other sites More sharing options...
MHz Posted November 6, 2004 Share Posted November 6, 2004 Example below maybe suitable? If %username% = 'A' then goto NameAIf %username% = 'B' then goto NameBIf %username% = 'C' then goto NameCIf %username% = 'D' then goto End:NameAsetup.exeexit:NameBsetup.exeexit:NameCsetup.exeexit:Endexit Link to comment Share on other sites More sharing options...
Tsunami Posted November 6, 2004 Share Posted November 6, 2004 I'm not sure what language you wrote that example in, but if it's supposed to be a batch file, then it's wrong IF "%UserName%" == "A" GOTO NameAIF "%UserName%" == "B" GOTO NameBIF "%UserName%" == "C" GOTO NameCIF "%UserName%" == "D" GOTO End:NameAsetup.exeEXIT:NameBsetup.exeEXIT:NameCsetup.exeEXIT:EndEXIT Link to comment Share on other sites More sharing options...
Jono Posted November 6, 2004 Share Posted November 6, 2004 IF "%UserName%" == "A" GOTO NameAIF "%UserName%" == "B" GOTO NameBIF "%UserName%" == "C" GOTO NameCEXIT:NameAsetup.exeEXIT:NameBsetup.exeEXIT:NameCsetup.exeEXIT Link to comment Share on other sites More sharing options...
MarcoTips Posted November 6, 2004 Author Share Posted November 6, 2004 thanks jono, your example was what I needbut what should I use to get the computername Link to comment Share on other sites More sharing options...
jdoe Posted November 6, 2004 Share Posted November 6, 2004 but what should I use to get the computernameThe answer is in the question%ComputerName% 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