|
OK, there are at least two ways to do this. The "right" way and the "wrong" way. Or perhaps a better way to put it is the "long" way and the "wrong" way.
The "long" way is to use Orca or some other MSI package editor and manually add the shortcuts and other stuff to make it work. That is complicated, and I will assume that if you knew how to do it, you would have done it already.
So here is the "wrong" way. This is kind of a hack because the VS NET Setup IDE provides very limited functionality.
1) Add msiexec.exe to your setup project. You can find it in the WinSys folder. It only adds 63KB to your package, no big deal.
2) This app will be used to execute the uninstall. VERY IMPORTANT! Make sure you configure it to be installed in the WinSys folder! The reason is if you put it anywhere else, the uninstall will lock up because it will try to uninstall msiexec.exe, but it cannot because that is what is running the uninstall. (You could put it somewhere besides the WinSys folder and mark it as permanent, but that would be poor form.)
On Win2K and higher this file is part of the Windows File Protection. It does not ever actually install (or try to uninstall) because it is protected. The setup basically ignores it, but you have to include it in your setup for the purpose of having a target to create the uninstall shortcut.
If your setup may be run on Win98 or NT4, you need to install msiexec.exe to the WinSys folder and mark it as permanent, because W98 and NT4 do not have the WFP found in higher Windows versions and the package will try to uninstall it and lockup.
(I hope that makes sense?)
If you did not understand the above explanation, don't worry. Just make sure the msiexec.exe is installed in the WinSys folder and mark it as permanent for good measure and it will work on all Windows OS versions.
3) Once you have added the msiexec.exe file, create the Uninstall shortcut wherever you want it to be. (I'm assuming you know how to do this in VS NET IDE.
4) Set the properties for the Uninstall shortcut:
Working Folder: System Folder (probably does not matter what this is set to actually).
Target: msiexec.exe
Your setup is now configured to run msiexec.exe when the user clicks the Uninstall shortcut.
5) Now you have to add the command line arguments. You have two switch options:
/i
/x
The /i switch will cause the setup to run in repair mode which gives the user the option to uninstall.
The /x switch will start the setup to uninstall only.
At face value, you would think that /x is the preferred switch. But there is sometimes a problem with it. It displays a dialog that asks you if you are sure you want to uninstall. But the dialog does not always appear on top, and if it does not, many users will think nothing has happened. (Try it both ways, /i and /x, you'll see what I mean.)
6) Add the Product code GUID after the switch to complete the command line arguments. You can find this in the Setup Project properties page as "ProductCode". Copy the GUID as is.
When you are done, the Property page for your Uninstall shortcut should look something like this, except your GUID will be different of course:
Name: Uninstall
Arguments: /i{1FD74ECE-4A34-434E-AC0C-A8B720844332}
Target: msiexec.exe
Working Folder: System Folder
That should do it.
Since there are a number of steps, please repost that you got it working, or else post if you have probelms. I tested this on Win2K. If you set it up properly it WILL work.
Robert
|
|
|
|
|
Thanks for detailed answer
After googling,i found that,if i add a batch file in my package with the following line
msiexec/x {Product ID} ,i exactly dont remember the switch,
after running the shortcut on client machine,it did install the program but it also showed DOS window due to execution of batch file
However,i was advised by mnay people that i shoudn`t add Uninstall Shortcut in start menu as this isn`t feasible,therefore i removed it now so that one can uninstall by going ot Add Remove Program applet
Thanks
-adnan
MyBlogs
http://weblogs.com.pk/kadnan
|
|
|
|
|
Yes, the batch file approach is the quick and dirt way, but I don't like the DOS window appearing.
It's not that it is not feasible - you can do it using the technique I described. People say you should not add an Uninstall shortcut, not because it is not feasible, but rather because Microsoft Logo program says that you should not add an Uninstall shortcut.
Yet many Microsoft products doi exactly that, despite what they say.
Examples:
I just downloaded the most recent Platform SDK from Micrososft. It adds an Uninstall shortcut to the menu.
I downloaded the beta version of Microsoft's new Anti-Spyware application. It adss an Uninstall shortcut to the menu.
MSDE setup adds an Uninstall shortcut to the menu.
In short, unless you plan on having your setup Logo Certified, add an Uninstall shortcut if you want to and don't worry about people saying you "should not do that.
(And besides, what's the point of going through the hassles of getting Logo certified when most Microsoft setups don't even meet their own Logo requirements?)
Robert
|
|
|
|
|
Purpose Behind of calling DTS Pacakage is to create flat file containg records And again i have to use this file or read records and update my table.
Text file has got fix length.
So can we use DTS packkage Which can be useful to convert data from text file to database.If possible Provide code for the same.
Sagar S Jagadale
|
|
|
|
|
Hi Sagar,
You can go through the link given below.
http://www.15seconds.com/issue/030909.htm.
Hope this will help you.
Thanks and Regards,
SGS
|
|
|
|
|
Hi Guys and Gals!
Do controls, Panels for example, have a maximum size limit?
If so, what is the maximum width of a panel?
Thanks!
Solid Rock
|
|
|
|
|
(0,0)You can set it's size as you want there is no minimum size for any control UNLESS you explicity define this in it's properties
|
|
|
|
|
Not minimum - maximum... When you try to set the maximum size (width, for example) of a control (a panel, for example) to a value that is over 32767 (signed int16), it is automatically set back to 32767.
Is there a way to set the width value of a panel to over 32767?
|
|
|
|
|
Hi, All:
I play video using AudioVideoPlayback.Video in C#. I need to draw some markups on the video. How can I do this? I tried the following code. But once the function RenderToTexture() is called, I noticed several important properties (AverageTimePerFrame , etc.) in the video object is missing. Even after I work around this, the video shown in the event handler video_TextureReadyToRender() is corrupted and does not advance. I'm using DirectX (Feb 2005 Update). Please help.
Thank you.
<br />
private void LoadVideo()<br />
{<br />
PictureBox box = new PictureBox();<br />
Video video = new Video(video_path);<br />
<br />
PresentParameters present_parameters = new PresentParameters();<br />
present_parameters.Windowed = true;<br />
present_parameters.DeviceWindow = box;<br />
present_parameters.PresentFlag = PresentFlag.Video;<br />
present_parameters.SwapEffect = SwapEffect.Flip;<br />
<br />
Device graphics_device = new Device(0, DeviceType.Hardware, box,<br />
CreateFlags.HardwareVertexProcessing, present_parameters);<br />
<br />
video.RenderToTexture(graphics_device);<br />
video.TextureReadyToRender +=<br />
new TextureRenderEventHandler(video_TextureReadyToRender);<br />
<br />
video.Play();<br />
}<br />
<br />
private void video_TextureReadyToRender(object sender, <br />
TextureRenderEventArgs e)<br />
{<br />
e.Texture.Device.BeginScene();<br />
....<br />
e.Texture.Device.EndScene();<br />
e.Texture.Device.Present();<br />
}<br />
Recnelis
|
|
|
|
|
|
I am having dataset cantaing lots of records.From that datset i have pick all the data and create a textfile of that records.And again I have to use the same textfile & update Database.What should I do
Sagar S Jagadale
|
|
|
|
|
What should you do about what? You mentioned two things. (1) Saving the contents of a DataSet to a text file. And (2) reading the contents of the text file into a database.
1. is fairly trivial if you only have one table with no complex data (i.e. no binary data)
2. has the potential of being done directly in the database, but you may wish to have it run through your application instead so as to provide a consistent user interface where the user doesn't have to learn a database product in order to import the data.
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Hi Colin,
Thanks for your suggestion.Can u provide cod e for the Same
Sagar
|
|
|
|
|
hi,
I am planning to write MCP certification in c#.NET can anyone sujest me some good book for this certification.
Thanking you.
Satish
|
|
|
|
|
Hi,
You can use Microsoft Selfpased Training Kit its a very good book. Also we have some books which we can down load for free in informit.com.
Thanks
SGS
|
|
|
|
|
hi kodanda Pani,
U suggested Microsoft Selfpased Training Kit.I could not find this.Can u just gide me to find it and also u told that some free books in informix.com I did not find them can u tell me how do I get these.
Thanking you in advance.
Satish
|
|
|
|
|
Hi,
In Microsoft Self-Paced Training Kit there is one book for each exam. You can get them from any vendor or online shopping marts. Aslo you can go to http://www.informit.com website and search for MCAD books. There are few good books avaliable in this site also.
Thanks and Regards
SGS
|
|
|
|
|
Hi
I like the Exam Cram2 books from QUE.
Claudio
|
|
|
|
|
Hi all,
I'm working on a C# project and need to store sensitive data (things like authentication tokens for web services etc.). Because C# applications can easily be reverse-engineered I want to encrypt/obfuscate these values with one of the provided encryption classes. However, to decrpyt these values at runtime I need the key/initialization vector. These would need to be stored inside the application as well -> they're visible in a decompiler. That's some kind of "chicken and egg" problem, does anyone have a hint or solution for this?
Thanks
If a train station is where the train stops, what's a workstation...?
|
|
|
|
|
The normal solution to this problem is to store the hashed value of the password. When the user enters his/her password, the application hashes it and compares it with the stored hash value to see if they match.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
But I don't want users to have to enter a password for two reasons:
1. A user shouldn't have to care about internal things
2. The user password (which equals the one hashed and put in the source) has to be given to each user
If a train station is where the train stops, what's a workstation...?
|
|
|
|
|
|
If you are truely paranoid about it there are a few things you can do:
1) Write a C function that returns all of your information and compile it into a DLL. Use P/Invoke to retrieve the information. Make sure all of the string data you store in the DLL is encrypted. When you return it from the C function you can unencrypt it at that time. Store the keys in the DLL as a byte array not a string to prevent 'strings' processing.
2) Write a COM dll that does the same thing as 1
There are problems with this as well because anyone else can load the C function, or COM object and invoke the required methods.
There is also the question of hiding information from one customer to another. You could do a one-time key gen and store it on the client machine. This would prevent one customer from obtaining information that might be important to someone else if they got a hold of their data files.
Yet another approach would be to use an algorithmic key generation approach. This would involve using a complex sequence of steps that produce a static key. The key wouldn't embeded in the software, but the algorithm that generates the key would be in the code. This code then could be obfuscated adding another layer of protection (Protection being relative in this case).
Always remember that if a client has binaries on their machine, it's difficult to absolutely prevent them from getting a hold of important data. That being said, you can make it so difficult to obtain the information that it's not worth it.
Now for the security experts, security by obscurity is not a good option. All of the methods I have mentioned is security through obscurity. Normally when it comes to security you need to base on it something else, like 'things they have', 'things they know', etc...
-
Drew
|
|
|
|
|
Hi, I'm trying to have interprocess communication between two programs. The first one is written in C++ (embedded for PocketPC) and the latter in C# and .NET CE (for PocketPC). I want to use memmory mapped files for IPC.
In the C++ side I use the following API:
CreateFileMapping()
CreateMutex()
MapViewOfFile()
...
What can I do from the C# side in order to communicate properly?
Thank you,
Themis
|
|
|
|
|