Need help with some of my uninstallers please

Discuss & post Update Pack addons here.
Locked
User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Need help with some of my uninstallers please

Post by Mrs Peel » Sat Jul 07, 2007 11:09 pm

I've come unstuck with building uninstallers for a couple of my addons where the exe uses a shell dll file and need some assistance please.

My uninstaller part goes like this:

Code: Select all

[DefaultUnInstall]
BeginPrompt         = UninstallPrompt
EndPrompt           = RemovedPrompt
RunPreSetupCommands = KillProcess:1
DelFiles            = prog.root
DelDirs             = prog.root
DelReg              = prog.delreg
UnregisterDlls      = prog.dlls
For the UnregisterDlls part to work it has to be at the very end of the inf file which means that it runs after the DelFiles and DelDirs, so the DLL needs to be unlocked before the deletion sequence part.

For shell DLL's they are usually locked by explorer.exe, or in the case of WinRoll they are hooked into all of the application windows running on your desktop at the time and it seems to take about 2 minutes after de-regging the DLL before it has released them all - so once again, DLL is not successfully deleted and therefore the directory it resides in can't be deleted by DelDir (it must be empty for the directive to work).

I've been messing around with this for a few days and getting nowhere fast. I experimented with running the RunPreSetupCommands to kill exporer:

Code: Select all

[KillProcess]
taskkill.exe /IM explorer.exe /F
This allows the dll which is hooked to explorer.exe to be successfully deleted but then it kills your desktop and requires a reboot. So I am wondering is there anyway to do this sequence by using an inf file:

1st Operation: Unregister the DLL file (using the addon uninstaller)
2nd Operation: Set to run at next boot (I have no idea what to use for this)

Code: Select all

DelFiles            = prog.dlls
DelDirs             = prog.root
Thanks for reading.

Cheers

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Sun Jul 08, 2007 1:57 am

For shell extention DLLs sometimes not even UnRegistering the file using RunPreSetupCommands and REGSVR32 /u /s command will not mean the file will not be seen as already in use.
The way to make sure the file is deleted is this INF Trick I found to delete the file on reboot using the following flag in DelFiles section (you can add it to CopyFiles Section also if you use the same one for DelFiles, this will not affect copy in any way)
[Del&CopyFiles.Section]
ShellExt.dll,,,1
It will prompt to reboot, but you can click NO and it will still be deleted successfully when you finally do reboot.

Edit: You can also use AddReg to del, ren and set atributes to files but I got no time to explain how, and you are wrong about UnregisterDLLs I know for a fact that it runs before delfiles... It has to

Edit2: My Notepad++ AddOn uses these tricks

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Sun Jul 08, 2007 9:15 am

Thanks Rick, that seems simple enough so I'll take a look at the addon you suggest above.

One other thing tho? When the system reboots will it have deleted not only the .dll file but ALSO the directory from the DelDirs command?

I need to make sure any solution I consider leaves no trace of the program - which means no empty folders left behind.

Cheers for your reply.

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Sun Jul 08, 2007 10:05 am

No the dir remains... I don't see whats the big problem with an empty folder.

Give me the name & location of the file let me see if i can use AddReg to delete the folder on reboot also

User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Post by n7Epsilon » Sun Jul 08, 2007 1:26 pm

Try renaming the file and setting it to be deleted on next reboot, but no need to force it on the user.

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Sun Jul 08, 2007 9:12 pm

ricktendo64 wrote:... I don't see whats the big problem with an empty folder.
Isn't the whole point of an "uninstaller" to remove all traces of the program from your computer?

I detest software that does not completely remove itself from the registry, program folders and application data so I'm not going to build my own unistallers in a sloppy way that allows that.

Thanks for your reply n7Epsilon, but please remember that I am a complete newbie at making uninstallers so I would be grateful if you can provide me with some example please.

For starters, I have no idea whatsoever how to setup any kind of function that will run itself on system shutdown/startup and I have not been able to find any examples of that in any of the uninstallers that I have examined either.

Is this done by adding a registry command? Including an AddReg to my uninstaller which performs the command to delete a file and then delete an empty folder on next run?

Please can you explain to me in newbie language how this can be initiated from a registry entry - especially the "DelDir" on next boot.

Cheers for your replies.

:)

PS: I agree with you n7Epsilon about not forcing a reboot on the user. This is another pet hate of mine hehehe ;)
Last edited by Mrs Peel on Sun Jul 08, 2007 9:31 pm, edited 1 time in total.

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Sun Jul 08, 2007 9:22 pm

Here is an example of the dll and directory I need to delete on next boot if that helps:

Code: Select all

[Kill.Process]
taskkill.exe /IM winroll.exe /F

[UnRegister.DLL]
%16422%\Desktop\WinRoll\winroll.dll,1

[Delete.Folder]
%16422%\Desktop\WinRoll
So on next boot it needs to go:

Code: Select all

[Delete.File]
%16422%\Desktop\WinRoll\winroll.dll

[Delete.Folder]
%16422%\Desktop\WinRoll
Cheers

User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Post by n7Epsilon » Sun Jul 08, 2007 10:18 pm

Well the way this is done is through a registry entry that needs to be added to PendingFileRenameOperations...

Inf already caters for this just make DeleteFile for example like this:

Code: Select all

%16422%\Desktop\WinRoll\winroll.dll,,,1
The 1 is a flag that specifies that if a file is in use, it is added to the PendingFileRenameOperations registry key in HKLM\System\CurrentControlSet\SessionManager and deleted on the next reboot

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Sun Jul 08, 2007 10:45 pm

Thanks so much for your speedy reply n7Epsilon.

This will solve my problem to delete the locked file, now how can I force it to delete the program folder after it has deleted the file on next reboot so that I am not left with empty directories on my hard drive after an uninstall?

Is there such a thing as a "Pending Operation" to delete an empty directory?

Cheers
:)

User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Post by n7Epsilon » Sun Jul 08, 2007 10:54 pm

Well you could try the same flag on the folder as well. But i am not sure of that, the Inf reference shows the flag for CopyFiles and DelFiles-referenced sections.

Code: Select all

[Delete.Folder]
%16422%\Desktop\WinRoll,,,1
Edit: Yes PendingFileRenameOperations also works on folders, I think the above is the way to use it in Inf, but nothing in the reference seems to explicitly say it.

Edit #2: This tool (PendMoves) will help you to verify as it will show you the registered pending operations.

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Sun Jul 08, 2007 11:05 pm

n7Epsilon wrote:Yes PendingFileRenameOperations also works on folders, I think the above is the way to use it in Inf, but nothing in the reference seems to explicitly say it.
Yes there seems to be a LOT that is not referenced in the official tech guides for inf directives and is only discovered by the trial and error of addon makers. We can be so grateful to people like Gosh who has been so kind to document a lot of this "previously undocumented" stuff for us!
n7Epsilon wrote:This tool PendMoves will help you to verify as it will show you the registered pending operations.
Cool bananas I love nifty tools and I especially LOVE Mark Russinovich - I think I will ask him to marry me one day :D

It looks like this works similar to Exodus Why Reboot? so I can't wait to test it out.

Thanks again!!!

User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Post by n7Epsilon » Sun Jul 08, 2007 11:14 pm

I found some more info regarding the matter...

This flag causes SetupAPI.dll to call the MoveFileEx function with the MOVEFILE_DELAY_UNTIL_REBOOT flag value.

Here is the MSDN page about this function:
http://msdn2.microsoft.com/en-us/library/aa365240.aspx

The most significant parts of it:
This value can be used only if the process is in the context of a user who belongs to the administrator group or the LocalSystem account.
That means whoever will uninstall must be an admin user.
Note: Although \0\0 is technically not allowed in a REG_MULTI_SZ node, it can because the file is considered to be renamed to a null name.
Microsoft breaks their own rules, heh, anyway this is why if you try to enter the values manually into the PendingFileRenameOperations key using AddReg, you won't be able to enter a empty REG_MULTI_SZ value, Inf will ignore it and therefore mess up the key so the only way is the flag.
To ensure deletion of directories, move or delete all files from the directory before attempting to delete it. Files may be in the directory at boot time, but they must be deleted or moved before the system can delete the directory.
So you must delete all the other files in the folder and use the flag on any remaining files that may be in use (if not, the file is deleted and flag is ignored) and on the folder last because the system executes the pending operations in the order they were added.

So a safe bet is to use the flag on everything.

And a final note, using these features will make INFs incompatible with WIndows 9x/ME but that's not a major problem anyway... (for Windows 9x/ME we use WININIT.INI)

Mitsuko Aninikkou
Posts: 210
Joined: Tue Dec 13, 2005 12:52 pm
Location: The Netherlands (But running US WinXP, in case it comes up)

Post by Mitsuko Aninikkou » Sun Jul 08, 2007 11:32 pm

Mrs Peel, a bit off-topic but I stumbled upon some things while making an addon using your µTorrent inf as a template.

Firstly apparently taskkill is only included in Windows XP Pro, Windows XP Home users won't have it (can't confirm this as I don't have Windows XP Home). You can use tskill which is included in both versions but is more limited. Also neither program works if terminal services is removed with nLite, or if they're removed as part of the command line utilities with nLite.

Secondly you might want to add another copyfiles directive to the DefaultInstall section to copy the inf to %17%; the inf will be copied there during windows setup but not if you install it manually. (of course when you install the program manually it will also complain about the cab not being in the i386 folder, but the user can easily select the correct location)

Finally to remove the inf after uninstallation completes add a DelFiles directive with %prog_infs%,,,1. (you know how this works, I'm just pointing out that currently the inf remains after uninstallation)
Edit: Actually, scratch that last, here's a much better way to do it:
[DefaultUninstall]
Cleanup = 1

Will get rid of the inf called to uninstall the program. (although it doesn't get rid of the 'Precompiled Setup Information' .pnf file windows seems to create)

Thanks for all your work on this! ^_^

yumeyao
Moderator
Posts: 1718
Joined: Sun Aug 27, 2006 9:24 pm
Location: Taiyuan, Shanxi, PR China

Post by yumeyao » Mon Jul 09, 2007 12:31 am

taskkill not in XP home, yeah you're right
Image
My work list(Hosted by dumpydooby)

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Mon Jul 09, 2007 1:13 am

Mitsuko Aninikkou wrote:Mrs Peel, a bit off-topic but I stumbled upon some things while making an addon using your µTorrent inf as a template.
Not off topic at all. I only wish I had started a post about this before I started posting my rebuilds, cos it would have saved me 3 or 5 rewrites on some of them :oops:

So I will take this opportunity to explain my reasoning behind what I have done so far....
Mitsuko Aninikkou wrote:Firstly apparently taskkill is only included in Windows XP Pro, Windows XP Home users won't have it (can't confirm this as I don't have Windows XP Home). You can use tskill which is included in both versions but is more limited. Also neither program works if terminal services is removed with nLite, or if they're removed as part of the command line utilities with nLite.
Yes, somebody has already bought this to my attention and the point you make about what happens if a user has removed certain components with nLite is a very good one too.

Firstly, I am trying my best to cover all possible uninstall scenarios so that a program is removed completely and this has taken a lot of extra field testing on my part, because many of the utilities I have been releasing here as addons thinking that they were completely portable (self-contained) are actually adding stuff to their program files, users app data folder and registry on first run. So all those extra things I have had to make allowances for in my uninstallers. :evil:

I also have tried my best to cover all contingencies with the different operating systems as well. I personally run Win2003 server here and for the most part whatever runs on 2003 will also work fine on XP, but I confess that I had only been testing on XP Pro and not made allowances for any differences with XP Home. So all I can say is sorry about that and it is something I will be sure to consider in future.

Also I have recently been informed that the [SourceDisksNames.x86] will not work with 64-bit O/S's so I have had to make sure to include that in my release notes from now on. And please note that I will currently NOT be supporting 64-bit addons - except in the very RARE event that I might find myself on 64-bit in future (not in my upgrade budget for at least the next 5yrs)

I am still pondering on a solution to this absence of taskkill.exe in XP Home and my possible solutions might be to include a copy of that in the original installer - but I am not particularly in favour of that option except as a last resort, because I don't think it's polite to include stuff in my addons that might replace a user's existing system files.

The other possibility is that it might be feasible to add an extra set of commands in the inf file that XP Home can recognise and call on tskill instead of taskkill. If anybody has any suggestions about that I am always open to constructive input.

Ideally however, users should be wise enough to do the suggested thing and "close running programs" before they install or uninstall stuff - but heck who even bothers to do that?

I know I rarely ever do LOL, which is why I decided to include the Kill Process in the first place hehehe :D
Mitsuko Aninikkou wrote:Secondly you might want to add another copyfiles directive to the DefaultInstall section to copy the inf to %17%; the inf will be copied there during windows setup but not if you install it manually. (of course when you install the program manually it will also complain about the cab not being in the i386 folder, but the user can easily select the correct location)
Thanks for mentioning this also because I thought about this and made a concious decision to not do that and here's my reasoning:

I am thinking that if a user is advanced enough to be able to figure out firstly to "right click on inf to install" and secondly to know that when the windows pops up asking them for their i386 folder that this means they need to actually navigate to the folder of the unarchived addon cab and point their browser to that (which novice users obviously would not know how to do) then they should also be technically savy enough to know they must copy their inf file to the %17% directory.

Another thought I have about this is that I am not making these for local installs, I am making them to be integrated into an unattended setup, so I have to ask myself do I really want to make it easy for people to use Ryans server as a repository to download local installers that they should be sourcing directly from the program authors site and consuming the developers server's bandwidth instead of his.

I hope this reasoning makes sense, yes?
Mitsuko Aninikkou wrote:Finally to remove the inf after uninstallation completes add a DelFiles directive with %prog_infs%,,,1. (you know how this works, I'm just pointing out that currently the inf remains after uninstallation)
Edit: Actually, scratch that last, here's a much better way to do it:
[DefaultUninstall]
Cleanup = 1

Will get rid of the inf called to uninstall the program. (although it doesn't get rid of the 'Precompiled Setup Information' .pnf file windows seems to create)
Yes I am aware of that and if you happened to download any of my first batch of uninstaller rebuilds you will notice that I did have them set to delete the inf and also the pnf files from the %17% BUT I have since been informed of a very big problem with doing that on XP and Win2000 (it is not a problem for Win2003 however) which is this....

If the software has been unattendedly installed from a slipstreamed windoze ISO (integratored or nlited) then there will be an extra line of code placed in your sysoc file pointing to the inf file in the %17% directory which looks like this:

Code: Select all

WinRoll=ocgen.dll,OcEntry,WinRoll.inf,HIDE,7
If the inf file is deleted then the next time you run windoze add/remove programs applet it will kick up a fit telling you that the inf file is missing - because, as I have since learned, these integrated addons are being recognised as windoze components and obviously windoze does not like it when the sysoc tells it a component (or part of that compenent) should be there and it can't find it.

This is a very big annoyance to me and I don't know why Win2003 is not bothered by this but yet the other O/S's go nuts. The only feasible way to safely reinclude my inf/pnf file deletes again in my uninstallers is if we could figure out a way for the uninstallation sequence to edit the sysoc file and remove the line of code referring to that deleted inf/pnf file.

I've spoken to quite a few advanced techy people about this and nobody has a solution (as yet). There is one small ray of hope however, which is that bashrat has somehow figured out a way to remove entries in the sysoc with his driver pack builds. So I have a friend investigating that for me at the moment.

As soon a workable solution is found then I will reinclude the inf/pnf deletes. I sure hope we can find one because I so detest incomplete installations - it's a major pet annoyance of mine (right up there with peeps not acknowledging me for my work ROFL)
Mitsuko Aninikkou wrote:Thanks for all your work on this! ^_^
Thanks for the acknowledgement ;)

Mitsuko Aninikkou
Posts: 210
Joined: Tue Dec 13, 2005 12:52 pm
Location: The Netherlands (But running US WinXP, in case it comes up)

Post by Mitsuko Aninikkou » Mon Jul 09, 2007 1:16 am

By the way, I just figured out how to have the uninstaller prompt the user whether to also delete any custom settings that might've been set. Let me know if you're interested and I'll post the code here (it'll let you make any number of prompts)

Edit: The sysoc problem is an interesting point, but as it happens I know just the thing :)
Below is the relevant code:

Code: Select all

[DefaultUninstall]
UpdateInis = prog.sysoc

[prog.sysoc]
%17%\sysoc.inf,Components,[the program]=*
And voila, entry removed!

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Mon Jul 09, 2007 1:39 am

Thanks for the offer of that trick Mitsuko Aninikkou. Please post it here anyway because it is sure to be useful to other addon makers in our midst.

Personally I had a hard enough job resigning myself to the idea of including uninstallers at all because I only install tried and true utilities which I have been using for years and would never ever want to uninstall - and in the rare event that I want to remove it to substitute a better utility I have since found then I would just wait till I do my next O/S build and deal with it then (some of us rebuild our ISO's so frequently that we don't even care about uninstalling stuff hehehe)

I decided to go ahead and rebuild my collection because there was so much popular demand for it (see my poll in the general chat forum) but since it is a feature that I do not care about for my own personal use then you will obviously understand how I do not want members to think that this means that I should jump through hoops for them to cater for all their individual little uninstaller preferences.

So the comprise between me and my addon users will just have to be: OK peeps, I will rebuild these with uninstallers for you because there has been a demand for me to do so but I am only willing to go so far as to make these "completely removable" and that is all.

If you want to use the software then use my addons. If you don't like the software later then you have the choice to completely remove it from your live system. But anything inbetween I will not be catering for.

I have to be very "black and white" about this or all the inbetweens will just drive me crazy. :shock:

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Mon Jul 09, 2007 1:49 am

Oh you are replying too fast to my replies and I can't keep up with you now :P

This is a very painful learning curve for me and I need a specific example that relates to something I am currently working on. Would you mind posting me an example using my winroll addon, the inf code for this is below and rewrite my whole inf code with the additions that you suggest so I can do a "text compare":

Code: Select all

; Winroll v2.0

[Version]
Signature=$Windows NT$

[DefaultInstall]
OptionDesc    = "WinRoll Addon"
Tip           = "WinRoll"
Modes         = 0,1,2,3
CopyFiles     = prog.root
AddReg        = prog.addreg
ProfileItems  = prog.addshortcut

[DefaultUnInstall]
BeginPrompt         = UninstallPrompt
EndPrompt           = RemovedPrompt
RunPreSetupCommands = KillProcess:1
DelFiles            = prog.root,prof.link,prog.infs
DelDirs             = prog.deldir
DelReg              = prog.delreg
UnregisterDlls      = prog.dlls

[Optional Components]
WinRoll

[WinRoll]
OptionDesc    = "WinRoll Addon"
Tip           = "WinRoll"
Modes         = 0,1,2,3
CopyFiles     = prog.root
AddReg        = prog.addreg
ProfileItems  = prog.addshortcut

[SourceDisksNames.x86]
1="WinRoll Files","WinRoll.cab",,"i386"

[DestinationDirs]
prog.root  = 16422,"%prog_dir%"
prof.link  = 16407,"%prof_dir%"
prog.infs  = 17

[SourceDisksFiles]
license.txt = 1
winroll.dll = 1
winroll.exe = 1

[Prog.Root]
license.txt
winroll.dll,,,1
winroll.exe

[Prog.Infs]
%prog_infs%
%prog_pnfs%

[Prof.Link]
%prof_lnk%.lnk

[Prog.AddReg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%unin_path%","DisplayName",,"%disp_name% v%disp_vers% (Remove Only)"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%unin_path%","DisplayVersion",,"v%disp_vers%"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%unin_path%","Publisher",,"%addo_made%"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%unin_path%","HelpLink",,"%addo_help%"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%unin_path%","URLInfoAbout",,"%addo_info%"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%unin_path%","InstallLocation",0,"%16422%\%prog_dir%\"
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%unin_path%","UninstallString",,"rundll32.exe advpack.dll,LaunchINFSection %17%\%prog_infs%,DefaultUninstall"

[Prog.AddShortcut]
Name       = %prof_lnk%
CmdLine    = 16422,"%prog_dir%",%prog.exec%
SubDir     = %prof_dir%
WorkingDir = 16422,"%prog_dir%"
InfoTip    = Make windows roll up into their title bar

[UninstallPrompt]
Title      = %unin_name%
Prompt     = %unin_conf% %disp_name% v%disp_vers%?
ButtonType = OKCANC

[RemovedPrompt]
Title      = %unin_name%
Prompt     = %disp_name% %unin_done%

[KillProcess]
taskkill.exe /IM %prog.exec% /F

[Prog.Dlls]
%16422%\%prog_dir%\winroll.dll,1

[Prog.DelDir]
%16422%\%prog_dir%,,,1

[Prog.DelReg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%unin_path%"

[Strings]
prog_dir   = "Desktop\WinRoll"
prof_lnk   = "Win Roll"
prof_dir   = "Desktop"
prog.exec  = "winroll.exe"
unin_name  = "Mrs Peel Addon Software Uninstaller"
unin_conf  = "Do you really want to remove the program"
unin_done  = "has been successfully removed from your computer"
unin_path  = "WinRoll"
disp_name  = "Win Roll"
disp_vers  = "2.0"
addo_made  = "Addon by Mrs Peel"
addo_help  = "http://www.palma.com.au/winroll/"
addo_info  = "http://www.ryanvm.net/forum/"
prog_infs  = "WinRoll.inf"
prog_pnfs  = "WinRoll.pnf"
Last edited by Mrs Peel on Mon Jul 09, 2007 1:55 am, edited 1 time in total.

Mitsuko Aninikkou
Posts: 210
Joined: Tue Dec 13, 2005 12:52 pm
Location: The Netherlands (But running US WinXP, in case it comes up)

Post by Mitsuko Aninikkou » Mon Jul 09, 2007 1:54 am

Alright, it's actually quite simple:

Code: Select all

[DefaultUninstall]
RunPreSetupCommands = delsettings

[DestinationDirs]
prog.conf = <where-ever>

[delsettings]
rundll32.exe advpack.dll,LaunchINFSection %17%\<the inf file>,CoUninstall

[CoUninstall]
BeginPrompt = settingsprompt
DelFiles = prog.conf

[settingsprompt]
Title      = %disp_name% Uninstall
Prompt     = Also remove all settings?
ButtonType = YESNO

[prog.conf]
<the files to remove>
Note that this is just an example, and you could code it to do any number of things. I hope it's clear how you can expand this (don't forget you could even add a RunPreSetupCommands in [CoUninstall] for even more nesting).

PS: By the way Mrs Peel, did you notice the edit I made to my previous post?
Edit: Oh dear, I can't keep up with your posts either. Let me have a look at your code.

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Mon Jul 09, 2007 1:59 am

LOL yes we are getting lost in the cross-posting here, so I will take a break for an hour and go cook some dinner. If you can be the INF Magician to help me sort out this modification to the sysoc.inf file then I will share it with you hehehe

I hope you like yummy home made organic falalfels (I just learned to make them too ROFL) with yummy home made pita breads (can you smell the dough rising as we speak hehe)

Back inna hour (or two if I fall asleep in front of the TV after I've eaten) ;)

Mitsuko Aninikkou
Posts: 210
Joined: Tue Dec 13, 2005 12:52 pm
Location: The Netherlands (But running US WinXP, in case it comes up)

Post by Mitsuko Aninikkou » Mon Jul 09, 2007 2:16 am

Hehe, sounds good to me; here's the modified inf (I took the liberty of changing some other minor things, if I seem obnoxious my apologies, it's 8 AM here and I haven't gotten any sleep yet o-o):

Code: Select all

[Version] 
Signature = $Windows NT$ 

[DefaultInstall] 
OptionDesc    = "WinRoll Addon" 
Tip           = "WinRoll" 
Modes         = 0,1,2,3 
CopyFiles     = prog.root
AddReg        = prog.addreg 
ProfileItems  = prog.addshortcut 

[DefaultUnInstall] 
BeginPrompt         = UninstallPrompt 
EndPrompt           = RemovedPrompt 
RunPreSetupCommands = KillProcess:1 
UnregisterDlls      = prog.dlls 
DelFiles            = prog.root,prof.link,prog.delpnf ;Changed by Ver (Mitsuko)
DelDirs             = prog.deldir 
DelReg              = prog.delreg
UpdateInis          = prog.sysoc ;Added by Ver
Cleanup             = 1 ;Added by Ver

[Optional Components] 
WinRoll 

[WinRoll]
OptionDesc    = "WinRoll Addon" 
Tip           = "WinRoll" 
Modes         = 0,1,2,3 
CopyFiles     = prog.root 
AddReg        = prog.addreg 
ProfileItems  = prog.addshortcut 

[SourceDisksNames.x86] 
1 = "%prog_infs% Files","%prog_infs%.cab",,"i386" ;Changed by Ver (reusing the inf's name should help generalise this)

[DestinationDirs] 
prog.root   = 16422,"%prog_dir%" 
prof.link   = 16407,"%prof_dir%" 
prog.delpnf = 17 ;Changed by Ver

[SourceDisksFiles] 
license.txt = 1 
winroll.dll = 1 
winroll.exe = 1 

[Prog.Root] 
license.txt 
winroll.dll,,,1 
winroll.exe 

[Prog.DelPnf]
%prog_infs%.pnf,,,1 ;Added by Ver

[Prof.Link] 
%prof_lnk%.lnk 

[Prog.AddReg] 
HKLM,"%unin_path%","DisplayName",,"%disp_name% v%disp_vers% (Remove Only)" 
HKLM,"%unin_path%","DisplayVersion",,"v%disp_vers%" 
HKLM,"%unin_path%","Publisher",,"%addo_made%" 
HKLM,"%unin_path%","HelpLink",,"%addo_help%" 
HKLM,"%unin_path%","URLInfoAbout",,"%addo_info%" 
HKLM,"%unin_path%","InstallLocation",0,"%16422%\%prog_dir%\" 
HKLM,"%unin_path%","UninstallString",,"rundll32.exe advpack.dll,LaunchINFSection %17%\%prog_infs%.inf,DefaultUninstall" ;Changed by Ver to reflect new %prog_infs%

[Prog.AddShortcut] 
Name       = %prof_lnk% 
CmdLine    = 16422,"%prog_dir%",%prog.exec% 
SubDir     = %prof_dir% 
WorkingDir = 16422,"%prog_dir%" 
InfoTip    = Make windows roll up into their title bar 

[UninstallPrompt] 
Title      = %unin_name% 
Prompt     = %unin_conf% %disp_name% v%disp_vers%? 
ButtonType = YESNO ;Changed by Ver (personal preference :P)

[RemovedPrompt] 
Title      = %unin_name% 
Prompt     = %disp_name% %unin_done% 

[KillProcess] 
tskill %prog.exec% ;Changed by Ver (for portability)

[Prog.Dlls] 
%16422%\%prog_dir%\winroll.dll,1 

[Prog.DelDir] 
%16422%\%prog_dir%,,,1 

[Prog.DelReg] 
HKLM,"%unin_path%"

[Prog.Sysoc]
%17%\sysoc.inf,Components,%prog_infs%=* ;Added by Ver

[Strings] 
prog_dir   = "Desktop\WinRoll" 
prof_lnk   = "Win Roll" 
prof_dir   = "Desktop" 
prog.exec  = "winroll.exe" 
unin_name  = "Mrs Peel Addon Software Uninstaller" 
unin_conf  = "Do you really want to remove the program" 
unin_done  = "has been successfully removed from your computer" 
unin_path  = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinRoll" ;Changed by Ver (less redundant)
disp_name  = "Win Roll" 
disp_vers  = "2.0" 
addo_made  = "Addon by Mrs Peel" 
addo_help  = "www.palma.com.au/winroll"
addo_info  = "www.ryanvm.net/forum"
prog_infs  = "WinRoll" ;Changed by Ver
Hope I didn't break anything! Oh, and I can't really illustrate the trick with the prompt without knowing what settings Win Roll creates that can be deleted ;) I do have an example of it though, in the addon I was working on tonight for the program Driver Sweeper. I'll post it when I get permission from the author.

PS: beeeeed...

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Mon Jul 09, 2007 10:30 am

Hahaha I am familiar with this bad sleep pattern - haven't been to sleep before sunrise for two weeks since my landlord died (it's kinda creepy to know that somebody died in the next room from me ewwwwwwwww)

So thanks a bunch for this Mitsuko - I can use some of these ideas! (sorry I ate all the falafels, but they were just way too yummy so I'll have to cook you a new batch tomorrow hehehe)

Will rebuild the winroll addon tonight and test it to see if it all works AOK now..... stay tuned for my tests results ;)

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Mon Jul 09, 2007 10:49 am

Thanks for the UpdateInis trick, now I can use Cleanup=1 again without breaking Add/Rem Components

Here is another tip... You don't need %17%, the default dir for INF is WINDOWS\inf (its also helpfull with DefaultInstall, it uses the INF no matter whay dir you right click & install it from)
"rundll32.exe advpack.dll,LaunchINFSection %17%\%prog_infs%.inf,DefaultUninstall"

Mitsuko Aninikkou
Posts: 210
Joined: Tue Dec 13, 2005 12:52 pm
Location: The Netherlands (But running US WinXP, in case it comes up)

Post by Mitsuko Aninikkou » Mon Jul 09, 2007 2:23 pm

Thanks for the tip :) I might post some code tonight when I get home, it's the inf for an addon I'm making that illustrates all we've found out so far.

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Test Results

Post by Mrs Peel » Mon Jul 09, 2007 10:53 pm

OK, here's my results so far (tested on Win2003):

# Using tskill instead of taskkill = SUCCESSFUL

# Entry removed from sysoc file = SUCCESSFUL

# Locked dll file deleted on next boot = SUCCESSFUL

# Removing "%17%\" from UninstallString = SUCCESSFUL

# Empty program directory deleted on next boot = FAILED

I also noticed one other thing when I was substituting the tskill for taskkill which is that you should NOT add the file extension .exe in your code. You just need the name of process, so it should look like this instead:

Code: Select all

[Kill.Process]
tskill winroll
Now this leaves me with just one more thing to sort out to complete my uninstaller:

How on earth am I going to force windoze to delete the empty program directory on next boot, cos this piece of code does not work with the ",,,1" added to the end of it:

Code: Select all

[Prog.DelDir]
Desktop\WinRoll,,,1
How does my INF Magician suggest I fix this? ;)

User avatar
Kelsenellenelvian
Moderator
Posts: 4383
Joined: Tue Nov 30, 2004 8:32 pm
Location: Pocatello, ID
Contact:

Post by Kelsenellenelvian » Mon Jul 09, 2007 10:59 pm

[delete.addreg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\AC","Delete",0,"cmd /c RD /S /Q ""%programfiles%\Attribute Changer""" :P

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Mon Jul 09, 2007 11:12 pm

Woohoooooo thanks! Off to test this now :) :) :)

newsposter
Posts: 1131
Joined: Wed Sep 14, 2005 11:31 am

Post by newsposter » Mon Jul 09, 2007 11:25 pm

Mrs. Peel, does this mean that you're going to re-cast and re-release most of your addins?

We all appreciate the MAJOR effort you put into your packs including the attention to detail and testing!!

User avatar
grief
Posts: 59
Joined: Thu Aug 10, 2006 5:31 pm
Location: Ohio

Post by grief » Mon Jul 09, 2007 11:35 pm

/agreed newsposter

i'm a neat freak and i love how you keep consistancy in your addons mrs. peel :) however i do like to keep my programs installed into default areas. ie, utorrent in your addon goes to /programs/internet/shortcut, where i like to keep my startmenu structure short and sweet. plus i'm used to them being there. its a tradeoff tho for nice uninstallers :)

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Re: Test Results

Post by ricktendo64 » Tue Jul 10, 2007 12:01 am

Mrs Peel wrote:How on earth am I going to force windoze to delete the empty program directory on next boot, cos this piece of code does not work with the ",,,1" added to the end of it:

Code: Select all

[Prog.DelDir]
Desktop\WinRoll,,,1
Yea that flag in DelDirs did not work for moi neither.

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Tue Jul 10, 2007 1:12 am

100% SUCCESSFUL MISSION !!!!!

{{{{{{{{{{{{{{{{ HiPPy HaPPy SHeeP DaNCe }}}}}}}}}}}}}}}

So many people to thank and such inadequate words to do it with so I think I'm gonna have to have a celebration party and invite y'all to my place (while I still have one hehe) and serve huge platters of yummy organic home made falalfels. :D
newsposter wrote:Mrs. Peel, does this mean that you're going to re-cast and re-release most of your addins?
All of them.... of course. How could you even wonder such a thing :P

Good news for you but ba-a-a-a-a-ad news for me. Expect to see some re-re-re-re-updates rolling out in the next few days. ;)
grief wrote:i'm a neat freak and i love how you keep consistancy in your addons mrs. peel :) however i do like to keep my programs installed into default areas.)
Yes, and I am an UBER-anally-retentive NEAT FREAK - which is why I do not want to have 500 frigging folders in windoze Program Files and divide all my apps into sub-categories. I've explained why I do this from the first day I started making addons and that's never going to change. So at least you get to enjoy the nice uninstallers eh ;)

See my prototype new-fangled uninstaller addon here.

Cheers m'dears!
8)

Mitsuko Aninikkou
Posts: 210
Joined: Tue Dec 13, 2005 12:52 pm
Location: The Netherlands (But running US WinXP, in case it comes up)

Post by Mitsuko Aninikkou » Tue Jul 10, 2007 6:56 am

Kelsenellenelvian wrote:[delete.addreg]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\AC","Delete",0,"cmd /c RD /S /Q ""%programfiles%\Attribute Changer""" :P
Hmm, probably best to lose the /S just in case the user had some custom files left in the folder (in my as yet unreleased addon I do ask if settings and logs should be deleted, and I do delete the Logs folder with /S/Q, but I wouldn't like to have any personal stuff deleted :) )

I'll be posting said addon sometime today, after I touch up on some minor things. By the way, does anyone know if it's possible to keep the command window from showing up in this line (without RunHiddenConsole):
[unin.config.logs]
CMD /C RD /S/Q """%16422%\%disp_name%\Logs"""

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Wed Jul 18, 2007 7:19 am

PROBLEMO UNO

I need some help with this addreg code please.

When I examine these two keys in regedit they read all as one data value, with the individual paths separated by what looks like a unix symbol for a linebreak (a box symbol). I know it is a linebreak because when I copy it from regedit and paste it in notepad it makes a linebreak.

When I exported these two keys in regedit it exports as this, and makes linebreaks where the symbols were:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\ZabaraKatranemia Plc\xplorer2\MainFrame Settings]
"szLeftTabs"="C:\\
C:\\
C:\\
C:\\
C:\\
C:\\"
"szRightTabs"="C:\\
C:\\
C:\\
C:\\
C:\\
C:\\"
I have converted this to inf format and created my own custom folder paths as follows, however when I install the addon the reg code breaks after the first linebreak (after "%24%):

Code: Select all

HKCU,"%soft_path%\MainFrame Settings","szLeftTabs",0,"%24% 
%16384% 
%16389% 
%16397% 
%16398% 
%16423%"
HKCU,"%soft_path%\MainFrame Settings","szRightTabs",0,"%11% 
%17% 
%11%\ShellExt 
%16424%\SendTo 
%16410% 
%16410%"
So what I am needing to know is how can I make this value all on one line and what symbol is there which I can use to tell the addreg that this is a line break (without having a physical linebreak in my inf code), eg something like this (the html break tags are just hypothetical examples:

Code: Select all

HKCU,"%soft_path%\MainFrame Settings","szLeftTabs",0,"%24%<br>%16384%<br>%16389%<br>%16397%<br>%16398%<br>%16423%"
HKCU,"%soft_path%\MainFrame Settings","szRightTabs",0,"%11%<br>%17%<br>%11%\ShellExt<br>%16424%\SendTo<br>%16410%<br>%16410%"
I know there are members here who have figured out how to do this but I can't find that information on any searches I have made.

Cheers and thanks for reading.

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Wed Jul 18, 2007 7:21 am

PROBLEMO DOS

And here is another problem that I am having which I am sure there is a simple solution to for this DOS dunce (me).

I have an addon which requires a legacy driver installed. The software package has two files - one is a .sys (appdriver.sys) file and the other a cmd .exe (RegDriver.exe) which you run with a commandline switch to install or uninstall the driver.

From run, in the command window I type this to install: C:\Program Files\Program\Driver\RegDriver.exe -i

And to uninstall the driver and unload from registry: C:\Program Files\Program\Driver\RegDriver.exe -r

After a whole day of messing around I finally found a way to do this using a postsetup command

Code: Select all

[Prog.AddReg]
HKLM,"%inst_run%","%prog_inf%",,"rundll32.exe advpack.dll,LaunchINFSection %prog_inf%.inf,Post.Setup"

[Post.Setup]
RunPostSetupCommands = Prog.Setup:1

[Prog.Setup]
CMD /Q /C """"%16422%\%driv_dir%\RegDriver""" -i"
So now I have an even bigger problem, and not knowing DOS or cmd window stuff I am unable to solve it....

When I test this (I disable the :1 so cmd window is not hidden and use /K instead of /C to make window stay open so I can read the result) I get an error message to say that the system cannot find appdriver.sys (it has obviously found RegDriver.exe OK) in the folder "D:\Programming\Addons\" which is the name of the folder where I installed the addon cab file from during local install.

What I want to know is why can this commandline of mine find RegDriver.exe post-install in it's correct folder and execute itself properly with the -i switch - but it is looking for the file appdriver.sys in the folder from where the cab was unpacked??? Why does it not look for it in the same folder as itself??????

Just in case I didn't explain myself clearly above, this path/switch works AOK from the windows run box and the executed file finds is sys driver OK within its own folder.

Please can somebody help? I can't even find any cmd guides online to give me any clues with this :(

Cheers and thanks for reading

PS: If you are wondering why I haven't been around for the last three days, it's because these two inf files I am stuck on are driving me to insanity (not that that was a long way to go for me heh)

User avatar
code65536
Posts: 735
Joined: Wed Mar 14, 2007 2:58 pm
Location: .us
Contact:

Post by code65536 » Wed Jul 18, 2007 10:50 am

It's because when you run something from Run, it sets the active path to the parent directory of the thing being run, or to a path of the apps choosing. Now here's the rub. You're not running your app. You're actually running cmd, and cmd then subsequently calls your app. Meaning, Windows will set to active path to what cmd's usual active path is (%userprofile%) and then when cmd executes something, it never sets the active path unless it is explicitly told to do so by CD.
My addons: CmdOpen - HashCheck - Notepad2 - MS Runtimes - DirectX

Into the breach, meatbags!

User avatar
n7Epsilon
Moderator
Posts: 624
Joined: Thu Feb 17, 2005 1:37 am
Location: Cairo, Egypt

Post by n7Epsilon » Wed Jul 18, 2007 10:57 am

As for problem Uno:

This is a known problem in REGEDIT and in the INF format. Regedit does not export REG_SZ that contains line breaks (CRLFs) correctly (as you see), producing invalid output in the REG file that doesn't import properly (as you have seen). The problem with converting this to INF is also the same, there is no known way (so far) to represent CRLFs in INF (line break in value will cause parser to stop parsing that line).

The only way that works is representing the REG_SZ data in a hex(1): notation (converting the string to a hexadecimal format) and importing via a REG file. (hex(1) has no known flag in INF AFAIK).

In the current version of Reg2Inf, I remove all line breaks from values like that and write a warning in the output...

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Wed Jul 18, 2007 11:06 am

LOL... Wonder whose addon's you get this idea from

Try this: Drop CMD /Q /C and the quadruple quotes (the :1 flag will work on this also not just CMD windows)

Code: Select all

[Prog.Setup]
%16422%\%driv_dir%\RegDriver -i
If that does not work and you need to call it from a CMD window then try this (you don't really need to quote the -i switch, only path names that contain spaces and only the second path needs the tripple quotes, the first does not)

Code: Select all

[Prog.Setup]
CMD /Q /C """%16422%\%driv_dir%\RegDriver""" -i
EDIT: Option 3 use a simple RunOnce AddReg

Code: Select all

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","RegDriver",,"""%16422%\%driv_dir%\RegDriver"" -i"
LATE EDIT: Option 4 use RegisterDLLs

Code: Select all

RegisterDLLs=Reg.Driver

[Reg.Driver]
16422,%driv_dir%,RegDriver.exe,,,"-i"

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Thu Jul 19, 2007 3:10 am

ricktendo64 wrote:LOL... Wonder whose addon's you get this idea from
I have no idea. I've been working on this for 3 days, read about 100 posts looking for ideas, googled googled and googled for inf file information, privately sought help from 3 addon makers, dissected about 20 different addons from 5 different addon pack makers looking for a possibility and tested many different ideas of my own. Isn't this what we suggest learners here to do? Search forums, read guides, ask advanced users, examine existing addon packs and experiment by trial and error? So I don't know what your point is.

This was the very first thing I ever tried. Executes program OK but ignores the -i switch.

Code: Select all

[Prog.Setup]
%16422%\%driv_dir%\RegDriver -i
Tried this also. As above, it executes the program but ignores the -i switch.

Code: Select all

[Prog.Setup]
CMD /Q /C """%16422%\%driv_dir%\RegDriver""" -i
Tried several variations of this already and as above it will execute the program but ignores the -i switch.

Code: Select all

HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce","RegDriver",,"""%16422%\%driv_dir%\RegDriver"" -i"
I tried this also but this is a sys file not a dll file and I get a windows error to say so.

Code: Select all

RegisterDLLs=Reg.Driver

[Reg.Driver]
16422,%driv_dir%,RegDriver.exe,,,"-i"
The only thing I have tried that will ACTUALLY execute the cmd exe RegDriver.exe where the -i switch works is this code which I mentioned in my previous post:

Code: Select all

CMD /Q /C """"%16422%\%driv_dir%\RegDriver""" -i"
But as a said before, even though it finds my exe OK and executes it properly with the -i swtich, because of this CMD problem (that code65536 has explained since) it is trying to find the sys file it needs to execute itself over in the wrong place.

So, as it stands so far, I think I should revisit the idea of using the CMD and see if there is a way to run CMD so that it can force my exe to point to the sys file in its correct location.

Does anybody have any ideas of how this might be possible please?

Thanks for reading.

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Thu Jul 19, 2007 3:16 am

As for problem Uno:

This is a known problem in REGEDIT and in the INF format. Regedit does not export REG_SZ that contains line breaks (CRLFs) correctly (as you see), producing invalid output in the REG file that doesn't import properly (as you have seen). The problem with converting this to INF is also the same, there is no known way (so far) to represent CRLFs in INF (line break in value will cause parser to stop parsing that line).

The only way that works is representing the REG_SZ data in a hex(1): notation (converting the string to a hexadecimal format) and importing via a REG file. (hex(1) has no known flag in INF AFAIK).

In the current version of Reg2Inf, I remove all line breaks from values like that and write a warning in the output...
It's not just reg2inf n7Epsilon, even Willypad will not deal with this either, so no problem with your utility.

5eraph has already suggested to me that using hex might be the only way to approach this, but now I am stuck again because I have no knowledge of hex or how to convert them.

Also it has been suggested there could be problems using LDID in hex and it might require an absolute path. Unfortunately I do need an LDID path, otherwise this addon will have problems for users who do not install their OS to C: drive, or who use non-standard default windoze directories (such as My Docs, My Pics etc etc)

Is there any utility you can recommend to me please?

Cheers for your reply :)

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Thu Jul 19, 2007 3:50 am

Mrs Peel wrote:So I don't know what your point is.
My point is I am the only one using that runpostsetupcommands trick in their addons, you got that from one of mine.
Mrs Peel wrote:I tried this also but this is a sys file not a dll file and I get a windows error to say so.

Code: Select all

RegisterDLLs=Reg.Driver

[Reg.Driver]
16422,%driv_dir%,RegDriver.exe,,,"-i"
Then that means you did NOT try it.
Just try it & stop assuming it will not work because tis a EXE and not a DLL (I know what the hell I'm talking about)

EDIT: did you try

Code: Select all

"%16422%\%driv_dir%\RegDriver" "%PATH_2_SYS_FILE%\File.sys" -i
Last edited by ricktendo64 on Thu Jul 19, 2007 4:02 am, edited 1 time in total.

User avatar
5eraph
Site Admin
Posts: 4619
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Thu Jul 19, 2007 4:02 am

ricktendo64 wrote:My point is I am the only one using that runpostsetupcommands trick in their addons, you got that from one of mine.
Umm, no. The following link confirms she's been using it at least 4 months before you became a member here. :P
Mrs Peel wrote:OK I enlisted some help from Kel who is testing out Win2k3 (sorry I forgot to mention I am using this OS) and here's the code which he's confirmed works:

Code: Select all

;Disable Windows Picture and Fax Viewer in Windows 2003.

[Version]
Signature="$Windows NT$"

[Optional Components]
DisableViewer

[DisableViewer]
DelReg               = Viewer.DelReg
RunPostSetupCommands = Viewer.Uninstall

[Viewer.DelReg]
HKCR,"SystemFileAssociations\image\ShellEx\ContextMenuHandlers\ShellImagePreview"

[Viewer.Uninstall]
"%11%\regsvr32.exe /u %11%\shimgvw.dll"
Not sure if I need to make a different version for both XP and Win2k3.

As a matter of interest I noticed in the latest nLite RC6 release notes there is some more control over that pesky pics and fax viewer. Hopefully Nuhi has added a new tweak in there to disable it during ISO build and this INF method will become obsolete. I'll be taking a look at that later today.

Cheers m'dears and thanks for the tech support :)

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Thu Jul 19, 2007 4:26 am

Using RunOnce to launch it because Windows Setup does not support RunPostSetupCommands and the Tripple quotes to stop getting a error because of the spaces in the path and the CMD before it and the silent flag :1. You were doing all that before I was a member?

Back on topic, here is a personal addon of mine and this is how I register it using RegisterDLLs (its a EXE)

Code: Select all

RegisterDLLs=PhoneTray.Register

[PhoneTray.Register]
16422,%TRAYSOFT%,PhoneTray.exe,,,"-install"

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Fri Jul 20, 2007 12:39 am

ricktendo64 wrote:Just try it & stop assuming it will not work because tis a EXE and not a DLL (I know what the hell I'm talking about)
Oh you do? You've edited and re-edited your replies so many times during this thread I was sincerely starting to wonder.

For the sake of clarity and continuity, it would be more helpful if you make a NEW reply every time that you revise your previous idea, in case I do not notice your edit and assume I have already tried something that I did not.

That is assuming that you actually are trying to help, and not just make me feel small by commanding me to obey you like I am incompetent.

So yeh, uhmm what was the topic? That I cannot make an addon without "stealing your ideas"?

:rolleyes:

User avatar
ricktendo64
Posts: 3213
Joined: Mon May 22, 2006 12:27 am
Location: Honduras

Post by ricktendo64 » Fri Jul 20, 2007 1:45 am

You remember saying I was messing with your addons? Well looks like YOU been messing with MY addons because yours have all been improved/recoded with lots of new INF uninstall tricks and other shit.

Your welcome
Mrs Peel wrote:So yeh, uhmm what was the topic? That I cannot make an addon without "stealing your ideas"?
YES... Without my help.

BTW I am being a bitch with you because that is how you were and are with me :twisted:

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Fri Jul 20, 2007 4:46 am

(((((sigh))))) Just as well my doctor prescribed me some tranquillisers yesterday, cos I might actually be able to respond to this silliness without uttering a single cuss word. It seems I need to spell some things out for you very very clearly...
ricktendo64 wrote:You remember saying I was messing with your addons?
I was referring to the time when you re-released some addons of mine without even asking me if I wanted your help with updating them and then you left my name in the inf and entries and file name as if it was my work. I think if somebody updated one of your addons without asking you, and posted them here (or at any other board) and left your name in the files you would be quite rightfully pissed about that too - and I would stand by you if somebody did that to one of your addons, because it is NOT a cool thing to do.

But re-posting a modified version of somebody else's work is absolutely not the same thing as members here examining each others addon making work and learning how to make better addons of their own to share here. In fact this is the very thing that we encourage new learners to do so that they also may learn, and I am sure you have done so yourself when you also were a new learner. If somebody thinks my work is good enough to learn from it then I regard that as a compliment - and maybe you should too?
ricktendo64 wrote:Well looks like YOU been messing with MY addons because yours have all been improved/recoded with lots of new INF uninstall tricks and other shit.

Your welcome
Oh OK, so when you posted this tutorial to help members learn how to make uninstallers you forgot to mention that anybody who benefits from reading all the files that you included with your post and examines the addon packs that you suggest we might learn from is actually stealing your ideas because you have copyright over these "tricks and other shit" (many of these ideas which have been discovered by others before you) even though you may well have been the first person to employ some of these ideas here on this board (as far as YOU know).

Where I come from this is called "indian giving", which means that the gift that you gave actually had strings attached and was not given with a true heart. You cannot give a gift and then claim that it still belongs to you, so I have just unstickied your tutorial thread (that I was so grateful for at the time when you gave it) in case other members here might use the ideas that were included in your zip file and get accused of stealing your good work too.
ricktendo64 wrote:
Mrs Peel wrote:So yeh, uhmm what was the topic? That I cannot make an addon without "stealing your ideas"?
YES... Without my help.
Ay caramba! Do you realise what an ass you are making of yourself here by saying things like this?

I constantly chat to other addon makers here and we ask each other for advise and exchange ideas. All of us here are constantly learning new and better things and examining each others work and testing each others work together to find what works and what does not. This is the beauty of online forums, in that we have the privilege of many many minds working together to pool our collective knowledge.

I can't even account for the many many different sources of all the many many different things that I have learned in my time here. These ideas (that you think belong to you personally and imply that I have "stolen") I know have come from three different sources over the last month - one of those sources mentioned that he heard the idea from you (when I asked him how I can stop a CMD window flashing). What did you expect me to do when he said that? Send you a message to ask your permission that I can use this idea?

Another of my friends here suggested to me something he had recently seen that might work for me in an addon I am building for my private use. MAYBE he got that idea from something he saw in an addon of yours? I don't know and I never bothered to ask - should I ask every person who gives me a new idea where they learned that knowledge? Or should I just go and beat him up now and accuse him of being a thief for stealing an idea of ricktendos and passing it along to me without your permission?

Another of my private sources of help and learning (a senior addon maker and long time member of MSFN) has taught me a couple of concepts recently that you mention above as if you seem to think "belong to you". I mentioned your accusation and he assures me that these inf tricks are not new at all and he has seen them used by others. Should we now search the MSFN archives for the last 5yrs and find out who has used them before and go tell them that you have stolen their ideas and claiming them as your own? LOL :D

Are you starting to get the message of how utterly silly your attitude sounds yet?

Unlike your attitude, mine is that knowledge belongs to the collective and that better ideas should be shared freely for the benefit of all. This is why I am such a strong supporter of Open Source, because that is the attitude of people in Open Source communities - that knowledge should be free for the benefit if the community (and society) and that what we give away makes us richer. It is also why I like to start threads like this, because it helps everyone to learn new things together.

If you think that some thing that you know (or learned) is your own intellectual property then why do you even bother to share your work here? Go patent the idea if you think you are the first person who ever thought of it and it belongs exclusively to you. Do you think that others do not examine your work also? I'll bet they would not want to publically admit that now after observing your macho attitude here towards me. You might accuse them of stealing because they didn't ask you personally for this knowledge too?
ricktendo64 wrote:BTW I am being a bitch with you because that is how you were and are with me :twisted:
You have been a bitch with me ever since I told you off for updating my addons last year.

I thought we had resolved the mutual hurt of that LAST YEAR and agreed to be friends again and leave the past behind us. I can assure you that I have not in any way deliberately set out to be an arsehole to you since then, but if you poke me with a stick I will surely bite. And I would thank you to note that my bitchiness did not arise in THIS thread here until you made your OWN bitchy comment about where I got my ideas from.

And in the thrill of the public stage show that you have transformed this previously productive thread into, you seem to have conveniently overlooked all the times since that I have been apologetic and friendly and given you credit for taking time to help me when you have done so (on the times that I actually DID ask you to help me) and shown my genuine gratitude that you took the time to share your learned knowledge in your tutorial thread.

So how much longer do I have to suffer you taking bitchy little swipes at me in public like this ricktendo? When is enough going to be enough for you? Don't you have the courage to take all this seeping bitterness to private message where it belongs and spare our poor long suffering readers these snotty little cat fights? Or is this something you like to do because you think it will make me look bad?

Well here's a newsflash... I personally do not care if people (here or in real life) perceive me as a bitch. I am going through a really bad menopause this last year, so I'm always just a few micrograms of oestrogen away from being bitchy and having an emotional meltdown. Tough luck for me huh? And for anybody who prods me with a stick too :twisted:

But I am guessing that you, unlike me, actually DO give a shit (oops I used a cuss word) if members here think you have made an ass of yourself with these testosterone-riddled rants. Am I right? I'll leave you to think about that and how much they are boosting your fame and popularity that you seem so attached to ;)

Now, please feel free to private message me any time if you actually ever do want to have a sincere discussion about how we can peacefully co-exist together on this board, cos I would really like that.

But in the meantime, I suggest you get back to the topic and if you can't help graciously then don't bother trying to "help" at all.

Have a nice evening (or day, or whatever it is where you live)

:)

User avatar
Mrs Peel
The Dominatrix Recoded
Posts: 1344
Joined: Tue Jan 17, 2006 2:02 am
Location: Aotearoa
Contact:

Post by Mrs Peel » Fri Jul 20, 2007 4:59 am

Oh, and just to let you know, I have got my regdriver pack working now using this idea, so I want to give you a very big warm thank you for that:

Code: Select all

[Reg.Driver]
16422,%driv_dir%,RegDriver.exe,,,"-i"
My MSFN friend that I mentioned above had actually shown me 2 variations of this technique a few days ago but they did not work because he didn't show me to use the quotes around the switch.

Please note that the ORIGINAL code that you posted here for this was:

Code: Select all

[Reg.Driver]
16422,%driv_dir%,RegDriver.exe,,,"-install"
Which did not work :(

So I did some experimenting and tried it with just the "-i" and voila it DID workI But I discovered this for myself BEFORE you came back here and edited your post to change the "-install" to "-i".

So can I count this as my OWN idea now? Since I figured it out for myself before you modified your post?

:D :D :D

User avatar
grief
Posts: 59
Joined: Thu Aug 10, 2006 5:31 pm
Location: Ohio

Post by grief » Fri Jul 20, 2007 7:26 am

someones abusing their moderator priviledges heh :rolleyes:

if you delete my post you should delete your one above as well.

User avatar
5eraph
Site Admin
Posts: 4619
Joined: Tue Jul 05, 2005 9:38 pm
Location: Riverview, MI USA

Post by 5eraph » Fri Jul 20, 2007 7:41 am

Let's take this to PM before anybody says or does anything they might regret later.

Locked