Jump to content

installation depending on username


Recommended Posts


Example below maybe suitable?

If %username% = 'A' then goto NameA
If %username% = 'B' then goto NameB
If %username% = 'C' then goto NameC
If %username% = 'D' then goto End

:NameA
setup.exe
exit

:NameB
setup.exe
exit

:NameC
setup.exe
exit

:End
exit

Link to comment
Share on other sites

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 NameA
IF "%UserName%" == "B" GOTO NameB
IF "%UserName%" == "C" GOTO NameC
IF "%UserName%" == "D" GOTO End

:NameA
setup.exe
EXIT

:NameB
setup.exe
EXIT

:NameC
setup.exe
EXIT

:End
EXIT

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...