Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4617690
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:09:36+00:00 2026-05-22T02:09:36+00:00

I am using FileCopy of NSIS installer to copy a folder along with its

  • 0

I am using FileCopy of NSIS installer to copy a folder along with its all subfiles from a source to destination. This works on XP but not on Windows 7. When i run the installer on Windows 7 , then the FileCopy dialog doesn’t even appears, it is just skipped out.
But in Windows XP, it properly shows the dialog box of “Copying Files” and succeeds.
What’s the problem? Please help.

!define FileCopy `!insertmacro FileCopy`
!macro FileCopy FilePath TargetDir
  CreateDirectory `${TargetDir}`
  CopyFiles `${FilePath}` `${TargetDir}`
!macroend

   ${FileCopy} 'C:\ACCBK\*.*' '$INSTDIR\ACCBK\'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T02:09:36+00:00Added an answer on May 22, 2026 at 2:09 am

    To make sure the installer runs as admin, use this code:

    RequestExecutionLevel admin ;Require admin rights on NT6+ (When UAC is turned on)
    
    !include LogicLib.nsh
    
    Function .onInit
    UserInfo::GetAccountType
    pop $0
    ${If} $0 != "admin" ;Require admin rights on NT4+
        MessageBox mb_iconstop "Administrator rights required!"
        SetErrorLevel 740 ;ERROR_ELEVATION_REQUIRED
        Quit
    ${EndIf}
    FunctionEnd
    

    If this is the problem, it means it was actually broken on XP as well (Any version of NT really), you just forgot to test as non-admin.

    CopyFiles just calls SHFileOperation, but there could be some breaking changes between XP and Vista+ of course…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using File.Copy(source, dest, true) to copy a file from local to remote
I'm using an example like this: System.IO.File.Copy(\\host\c$\folder\file.end, c:\file.end, true); But I'm only getting a
i am using the following code to copy files from one folder to another...
I would like to copy the file from source to destination directory. I heard
I am implementing cp(file copy) command using mmap(). For that I mapped the source
I have a small question: For example I'm using System.IO.File.Copy() method from .NET Framework.
I'm trying to copy some files from one network share to another using File::Copy.
I am trying to copy a file using this - private void button1_Click(object sender,
I am trying to Copy File from path to another using the following code:
When using the File.Copy() method the file is copied to its new directory however

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.