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|]
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)
Please log in to answer
Posted by:
anonymous_9363
13 years ago
Posted by:
roshasrockerdude
13 years ago
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
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
Posted by:
anonymous_9363
13 years ago
Posted by:
roshasrockerdude
13 years ago
Posted by:
cygan
13 years ago
Posted by:
anonymous_9363
13 years ago
Posted by:
aogilmor
13 years ago
Posted by:
AngelD
13 years ago
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
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.
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
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
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.
so that the conversation will remain readable.