/build/static/layout/Breadcrumb_cap_w.png

Simple but complex

Hello,

I need to Create two text files and Keep them into "[TARGETDIR]".
Write a Custom Action to redirect those two text files into "[ProgramFilesFolder]IBM"

I have set my ROOTDRIVE Property as "C:\" and so my TARGETDIR will be obviously C:\....so i just created two text files in C:\ drive and tried to added the same in my package By "Add File" option keeping my target as Destination computer.What my problem is it was not getting added and instead it was asking me to create a new folder and keep those files in that.Is it necessary to create a new folder or can we directly add those two files to my destination computer.
Then using the Set Directory i put a CA to complete the second task which displays 1322 error during runtime.
What to do? [8|]

0 Comments   [ + ] Show comments

Answers (12)

Posted by: anonymous_9363 13 years ago
Red Belt
0
It sounds like the complexity is entirely of your own making! LOL

Are the text files being created "on the fly" by a CA or do they already exist and just need installing to INSTALLDIR?
Posted by: roshasrockerdude 13 years ago
Senior Yellow Belt
0
Its not like that...Already the text files exists in my C Drive...My TARGETDIR is C:\..what i hv to do is to Write a Custom Action to redirect those two text files into "[ProgramFilesFolder]IBM" .I knw to create the custom Action using Set Directory.But my prob is that these text file i was able to add them into my package.Pls help me out..
Posted by: anonymous_9363 13 years ago
Red Belt
0
You don't need a Custom Action to copy files from one folder to another. Use the DuplicateFile table.
Posted by: roshasrockerdude 13 years ago
Senior Yellow Belt
0
Noted and Thanks...Its a new information for me...but actually in this case im suppposed to us the CA Only...But the thing is before going to custom action my doubt is y we are not able to add files in the Destination Computer...If the case is wrong then which is my TARGETDIR...
Posted by: anonymous_9363 13 years ago
Red Belt
0
in this case im suppposed to us the CA OnlyWrong. As a packager, you're supposed to use standard practice. CAs are for use where there is no native WI method to achieve the end result. Whoever is telling you to use a CA is NOT a packager and you need to educate them.
Posted by: roshasrockerdude 13 years ago
Senior Yellow Belt
0
Sorry my friend...im a trainee in packaging and my senior asked me to do some practice work on CA...so i posted the forum..can u help me in this aspect...
Posted by: cygan 13 years ago
Fifth Degree Brown Belt
0
to keep it nice and simple can't the person who told you to "do whatever with a custom action" help you
Posted by: anonymous_9363 13 years ago
Red Belt
0
can u help me in this aspectSorry, but I do my best to eliminate bad habits, not encourage them.

When you have a task which is more suitable for a CA, come back and I'll be happy to help. MEanwhile, you can learn all you need to know about CAs from your packaging tool's help file and on MSDN.
Posted by: aogilmor 13 years ago
9th Degree Black Belt
0
spot on, mate!
I remember having to remediate some horrid embedded vbscript in an MSI template from a guy who thought he was a packager but wasn't. He wasn't much of a coder either. One of his tools created a c:\winnt directory on Windows XP systems. "just in case". Doh!
Posted by: AngelD 13 years ago
Red Belt
0
ORIGINAL: roshasrockerdude

Noted and Thanks...Its a new information for me...but actually in this case im suppposed to us the CA Only...But the thing is before going to custom action my doubt is y we are not able to add files in the Destination Computer...If the case is wrong then which is my TARGETDIR...


Your need to handle files that should go into the "root" Destination Computer location in a special manner.
Create a dummay folder under Destination Computer, add the files to this dummy location and author a set directory custom action to point the dummy folder to ROOTDRIVE (C:\).

There are a lot of vbscript custom action examples on how to move files.

I would use an entry in the MoveFile table instead of duplicate as that would make a copy instead of moving it.
Posted by: roshasrockerdude 13 years ago
Senior Yellow Belt
0
Hi Packagers...I was given an assignment as explained below....The first three tasks has been completed..Still confused with the last two tasks...Not only but also using command line i was not able to repair my msi...but was getting repaired from arp repair button....Can u help me out to solve the last two tasks and the reason why it was not getting repaired through command line....

1. Create an VBscript (comment.vbs) which will check whether
HKCU\Software\Message hive exists and displays a message box by reading the
value of the key 'comment' in the HKCU\Software\Message hive. If this key
does not exist then the message box should display the message application
not installed.
2. Once the above script is ready add this to your MSI and create a
non-advertised shortcut for the comment.vbs file with shortcut name as name
3. The value of comment needs to be passed via the command line during
installation and written to HKLM\Software\Message comment key.
4. For every user the key HKCU\Software\Message comment key should be
created and the value of this key should be the username who is logging in.
5. When the user the clicks on the shortcut ,it should display the
username.

Note : You need to use custom actions for above ,don' create components for
the registry key . Create a component only for the shortcut and file
comment.vbs

Pls help me out.
Posted by: pjgeutjens 13 years ago
Red Belt
0
Roshan,

Looks like what you want to do for 4 and 5 is to simply 'wrap' the exe of the application in a vbs (your comment.vbs) that sets the key in HKCU (point 4) and then displays the username (point 5), and then, if desired, calls the exe of the application. Other option is to use ActiveSetup to trigger a (vbs)script that sets the HKCU key for each user(point 4), or a repair of the msi containing the HKCU key, and have the comment.vbs then read this key and display it when the shortcut is clicked (point 5).

All this since you have a non-advertised shortcut and can therefore not trigger the msi's selfheal (well you could but I assume that's taking it abit too far...)

Rgds,

PJ
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ