This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Copy files from a Network location
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 07, 2011
10:46 AM
Copy files from a Network location
My installer allows the placing of file in the same folder as the Setup.exe and upon running the installer, it copies this file into the INSTALLDIR using a VB Script CA.
The CA used to run after the execution sequence, but I had to modify this for Vista and Windows 7 recently, to make it a deferred action.
Everything works fine if the Setup.exe is on the local machine but try to run it from a network location and the file doesn't get copied. On XP I found that I had to change the CA from "Deferred Execution in system context" to simply "Deferred Execution". But on Vista and above neither work (unless it is run from the local machine).
Any ideas? Thanks in advance.
Basic MSI
The CA used to run after the execution sequence, but I had to modify this for Vista and Windows 7 recently, to make it a deferred action.
Everything works fine if the Setup.exe is on the local machine but try to run it from a network location and the file doesn't get copied. On XP I found that I had to change the CA from "Deferred Execution in system context" to simply "Deferred Execution". But on Vista and above neither work (unless it is run from the local machine).
Any ideas? Thanks in advance.
Basic MSI
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2011
05:15 AM
INSTALLDIR might not be available in the Deferred Context CAs. You need to use CustomActionData to make it available in the deferred context. This has to do with the UAC implementation.
Also, network resources will not be available to any CA running under Deferred Execution in System Context.
Also, network resources will not be available to any CA running under Deferred Execution in System Context.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2011
05:57 AM
Yes this is part of the modification I had to do to make it a deferred action. ie Pass in all parameters through the CustomActionData and parse it out inside VBScript. This works fine, I even tried posting a message to the screen displaying the results, the parsed to and from fields and fine. Note it works if I run the install from the local machine.
I know that I can't access network drives when running in system context, this is a security feature of windows. Hence I changed the CA from 'Deferred Execution in System Context' to plain 'Deferred Execution' and it works now on XP, but not in Windows 7.
However, I don't really know what I'm doing in this area. I have a vague recollection that 'Deferred Execution in System Context' is a must for Vista and above. Is the only solution to tell my QA people that it isn't possible to do this over a network.
I know that I can't access network drives when running in system context, this is a security feature of windows. Hence I changed the CA from 'Deferred Execution in System Context' to plain 'Deferred Execution' and it works now on XP, but not in Windows 7.
However, I don't really know what I'm doing in this area. I have a vague recollection that 'Deferred Execution in System Context' is a must for Vista and above. Is the only solution to tell my QA people that it isn't possible to do this over a network.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2011
06:15 AM
Why do you not just invoke an exe and do the copy?
You can use Win32 APIs... OR an opensource copy utility...
I remember having done that once in my bootstrapper exe.
This is just to confirm that the script is not the culprit...
Something to do with cscript engine or security for script execution etc...
You can use Win32 APIs... OR an opensource copy utility...
I remember having done that once in my bootstrapper exe.
This is just to confirm that the script is not the culprit...
Something to do with cscript engine or security for script execution etc...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 08, 2011
03:39 PM
The "ideal" fix for this is probably a two-part custom action. One in launching context which reads the file in (either to a system-local temp folder, or to a CustomActionData property), and one in system context which writes the file out. Unless a MoveFile table entry handles this better.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)