VMware Cloud Community
AnonymousDefaul
Enthusiast
Enthusiast

rename file does not work on Windows 10 without admin rights

Hi,


As part of post installation steps. directories are renamed in my installer. However the ' rename file'  post installation step is not working if  the user does not have admin privileges.I tired to rename the file using the ' <runProgram>'  with ' ren'  command but observe the same behavior.


Is there a way to rename files/directories without needing to have admin rights on the machine?


Best Regards


Siddharth

Labels (1)
0 Kudos
6 Replies
AnonymousDefaul
Enthusiast
Enthusiast

Hi Siddharth,

Renaming a file or folder will only be possible if you have the right permissions to change that folder. Is it possible to change it manually? Are you running the installer without admin privileges?

Regards,

Michiel

0 Kudos
AnonymousDefaul
Enthusiast
Enthusiast

Hi Michiel

Yes , I am able to change the folder name manually. I am running the installer without admin privilege.

Another thing I observed is that the shortcuts are also not created if the user does not have admin rights.If a user has admin rights, the shortcuts are created successfully.

Following is the code snippet used for creating the shorcuts. Let me know if this is correct.

<createShortcuts>
<destination>${installdir}/${product_shortname}_${product_version}/examples/</destination>
<shortcutList>
<shortcut>
<name>Test</name>
<windowsExec>${installdir}/${product_shortname}_${product_version}/libraries/Test/examples</windowsExec>
</shortcut>
</shortcutList>
<ruleList>
<platformTest>
<type>windows</type>
</platformTest>
</ruleList>
</createShortcuts>

Best Regards

Siddharth

0 Kudos
AnonymousDefaul
Enthusiast
Enthusiast

Hi Siddharth,

Could you tell us why the installer should run without Administrator privileges? It's possible to require Admin privileges from the user by setting <requireInstallationByRootUser>

```

<project>
...
<requireInstallationByRootUser>1</requireInstallationByRootUser>
...
</project>

```

Regards,

Michiel

0 Kudos
AnonymousDefaul
Enthusiast
Enthusiast

Hi Michiel,

Users of our software product are seeing this issue on their PCs. It is becoming more and more common for users of our software product not to have admin privileges, hence the installer need not enforce users to have admin rights. Is it possible to create shortcuts without installer needing to be run with admin privilege?

Best Regards

Siddharth

0 Kudos
michiel_dhont
Enthusiast
Enthusiast

Hi Siddharth,

It should be possible to create the shortcut as in your example. On which Windows version are you seeing this behavior?

Regards,

Michiel

0 Kudos
AnonymousDefaul
Enthusiast
Enthusiast

Hi Michiel,

I am seeing this behavior on Windows 10 machine on which a user does not have admin rights.

Is the code for short cut creation correct?

Best Regards

Siddharth

0 Kudos