MarcoTips Posted November 6, 2004 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
aresgodofwar Posted November 6, 2004 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.
MHz Posted November 6, 2004 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
Tsunami Posted November 6, 2004 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
Jono Posted November 6, 2004 Posted November 6, 2004 IF "%UserName%" == "A" GOTO NameAIF "%UserName%" == "B" GOTO NameBIF "%UserName%" == "C" GOTO NameCEXIT:NameAsetup.exeEXIT:NameBsetup.exeEXIT:NameCsetup.exeEXIT
MarcoTips Posted November 6, 2004 Author Posted November 6, 2004 thanks jono, your example was what I needbut what should I use to get the computername
jdoe Posted November 6, 2004 Posted November 6, 2004 but what should I use to get the computernameThe answer is in the question%ComputerName%
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