OK but isnt this strange:
when I open a cmd window and run this command:
rundll32.exe advpack.dll,LaunchINFSection shortcuts.inf
the inf file is executed and the DefaultInstall part will execute, it will start the CMD file.
BUT howcome, when I do Start>Run.. type the exact same command, press ENTER, it doesn't work!
also when I rightclick it doesn't work, but thats probably because by default it uses setupapi.dll.
EDIT:
OK, I understand now:
the working folder must be the folder containing the INF file, otherwise it wont run.
So Start>Run wont work (unless the inf file is in the system32 folder)
even when you specify the path like this:
rundll32.exe advpack.dll,LaunchINFSection D:\i\project\app\SHORTCUTS.INF,DefaultInstall
when you open a cmd window, go to the D:\i\project\app\ folder and use the exact same command as above, it doesn't matter if you specify path or not, will always work.
So it is a little bit strange you can only run it from within the folder. But it isn't a problem for me.
-----
s***, thought I had everything figured out!
I have a setup.cmd file with a parameter, called
uninstall.
the command:
setup.cmd uninstall will start the uninstall section of the cmd file. This works.
Now I want to use the inf file to run it (silently)
[uninstall.RunSetupCommands]
cmd.exe /C SETUP.cmd uninstall
Unfortunately it works only without
uninstall.
Is it even possible?
Reason I am doing all of this:
it seems to me INF file are a little bit uhm inefficient, my cmd file just moves some files and adds some reg entries, creates shortcuts and then starts a pdf file. The uninstall part deletes 3 directories with files, few other files, shortcuts and a reg entry
Doing all these things with the INF file seems to take a little bit more time and my harddisk makes a little more noise.
So thats why I choose for 1 INF file that creates (or removes, when uninstalling) the shortcuts in start menu (better then cmd cos works for all windows languages) and then runs the Setup.cmd (for installing or uninstalling), without showing the cmd window.
Seems to be the most efficient solution for an easy -one click- installer that works for all windows languages.
I just create a silent 7z sfx and done.
ofcourse I know vbs could work but I removed vbs support with nlite, maybe not very smart, but I actually don't need it.
This post has been edited by ZileXa: 31 May 2006 - 05:07 PM