rename file does not work on Windows 10 without admin rights

Comments

6 comments

  • Avatar
    BitRock support

    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
    Comment actions Permalink
  • Avatar
    Siddharth Deshpande

    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
    Comment actions Permalink
  • Avatar
    BitRock support

    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
    Comment actions Permalink
  • Avatar
    Siddharth Deshpande

    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
    Comment actions Permalink
  • Avatar
    michiel

    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
    Comment actions Permalink
  • Avatar
    Siddharth Deshpande

    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
    Comment actions Permalink

Please sign in to leave a comment.