crash1015
Level 2

Can an installer change the name of a PC?

Jump to solution

I want the installer to offer the user to rename the PC to something of their choice. Is this possible?

Labels (1)
0 Kudos
1 Solution

Hi @crash1015 ,

 

You can have one of the dialogs from the setup asking for Computer-Name to be changed during Setup execution.

To describe it in elaborated manner:

  • You can add text-field in any of the dialogs(Where you want it to be) to get new computer name from the user
  • Map the text field's text with a property
  • Use the property inside powershell custom action to execute Rename-Computer cmdlet

Thanks,

Jenifer

View solution in original post

4 Replies
Jenifer
Flexera Alumni

Hi @crash1015 ,

 

There is a power-shell cmdlet Rename-Computer that can perform computer-renaming.

 https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.management/rename-computer?view=powershell-7

You can make use of powershell custom action(with the above cmdlet in .ps1 file) of Installshield to get this work done.

 

Thanks,

Jenifer

0 Kudos

That's a very very good idea. But do you know how to make it prompt the user to enter in a new pc name?

0 Kudos

Hi @crash1015 ,

 

You can have one of the dialogs from the setup asking for Computer-Name to be changed during Setup execution.

To describe it in elaborated manner:

  • You can add text-field in any of the dialogs(Where you want it to be) to get new computer name from the user
  • Map the text field's text with a property
  • Use the property inside powershell custom action to execute Rename-Computer cmdlet

Thanks,

Jenifer

Danyvel
Level 2
Use powershell to froce rename your PC
0 Kudos