Go Back   Winamp Forums > Developer Center > NSIS Discussion

Reply
Thread Tools Search this Thread Display Modes
Old 7th February 2004, 16:32   #1
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
Question Could somebody see what is wrong with my script

Could you please look at my script
(At the bottom of the script)

I want that my installer automaticly sets the .ogm extension to open with Media Player Classic
Attached Files
File Type: nsi ml + wind and .nsi (88.8 KB, 63 views)
VegetaSan is offline   Reply With Quote
Old 7th February 2004, 16:38   #2
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
Script Information >>>>>

location "mplayercXP.exe"
$PROGRAMFILES\a-S Codec Pack\mplayercXP.exe
VegetaSan is offline   Reply With Quote
Old 7th February 2004, 17:58   #3
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
>>This is the IMPORTANT Section of the script<<

;------------------------------------------------

Section

!define Index "Line${__LINE__}"
ReadRegStr $1 HKCR ".ogm" ""
StrCmp $1 "" "${Index}-NoBackup"
StrCmp $1 "mplayercXP.OGMFile" "${Index}-NoBackup"
WriteRegStr HKCR ".ogm" "backup_val" $1
"${Index}-NoBackup:"
WriteRegStr HKCR ".ogm" "" "mplayercXP.OGMFile"
ReadRegStr $0 HKCR "mplayercXP.OGMFile" ""
StrCmp $0 "" 0 "${Index}-Skip"
WriteRegStr HKCR "mplayercXP.OGMFile" "" "Media Player Classic XP OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open"
WriteRegStr HKCR "mplayercXP.OGMFile\DefaultIcon" "" "$PROGRAMFILES\a-S Media Player Classic\mplayercXP.exe\mplayercXP.exe,0"
"${Index}-Skip:"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\open\command" "" \
'$PROGRAMFILES\a-S Media Player Classic\mplayercXP.exe "%1"'
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit" "" "Media Player Classic XP OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit\command" "" \
'$PROGRAMFILES\a-S Media Player Classic\mplayercXP.exe "%1"'
!undef Index
; Rest of script

SectionEnd
;-----------------------------------------------

WHAT IS WRONG??????????????????????????????????
VegetaSan is offline   Reply With Quote
Old 7th February 2004, 18:50   #4
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,896
What's the error?


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux w/ xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Debian unstable w/ xfce4.
Joel is offline   Reply With Quote
Old 7th February 2004, 18:58   #5
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
It doesnt give any error. It just dont work
VegetaSan is offline   Reply With Quote
Old 7th February 2004, 19:12   #6
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
Lobo King did you see my script. Could you take a look at that please and look what is the error THANKS
VegetaSan is offline   Reply With Quote
Old 7th February 2004, 21:37   #7
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
Sorry it was Lobo Lunar
VegetaSan is offline   Reply With Quote
Old 7th February 2004, 21:38   #8
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
Could Somebody help me ?????????

question = look above this Thread
VegetaSan is offline   Reply With Quote
Old 7th February 2004, 21:48   #9
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
Section
;----------------------------------------------------------
!define Index "Line${__LINE__}"
ReadRegStr $1 HKCR ".ogm" ""
StrCmp $1 "" "${Index}-NoBackup"
StrCmp $1 "mplayercXP.OGMFile" "${Index}-NoBackup"
WriteRegStr HKCR ".ogm" "backup_val" $1
"${Index}-NoBackup:"
WriteRegStr HKCR ".ogm" "" "mplayercXP.OGMFile"
ReadRegStr $0 HKCR "mplayercXP.OGMFile" ""
StrCmp $0 "" 0 "${Index}-Skip"
WriteRegStr HKCR "mplayercXP.OGMFile" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open"
WriteRegStr HKCR "mplayercXP.OGMFile\DefaultIcon" "" "$SYSDIR\mplayercXP.exe,0"
"${Index}-Skip:"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\open\command" "" \
'$SYSDIR\mplayercXP.exe "%1"'
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit\command" "" \
'$SYSDIR\mplayercXP.exe "%1"'
!undef Index

SectionEnd
;----------------------------------------------------------

Location File "$SYSDIR\mplayercXP.exe"

What is wrong ??????????????????????????????????????????
VegetaSan is offline   Reply With Quote
Old 7th February 2004, 21:50   #10
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
You don't have to shout every minute. And we also have a button to edit posts.

Try putting quotes around paths with spaces using $\"
Joost Verburg is offline   Reply With Quote
Old 7th February 2004, 21:50   #11
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
Note: The Compiler doesn't give a error (I can run the installer)

but .ogm files will not open with Media Player Classic
VegetaSan is offline   Reply With Quote
Old 7th February 2004, 21:52   #12
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
what do you mean ???

example please, thanks
VegetaSan is offline   Reply With Quote
Old 7th February 2004, 22:34   #13
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
It this case, the folder names contain spaces so you should put quotes around the whole path, for example:

"$PROGRAMFILES\a-S Media Player Classic\mplayercXP.exe"
Joost Verburg is offline   Reply With Quote
Old 8th February 2004, 10:38   #14
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
I am getting craZY I dont know why

;----------------------------------------------------------

Section

!define Index "Line${__LINE__}"
ReadRegStr $1 HKCR ".ogm" ""
StrCmp $1 "" "${Index}-NoBackup"
StrCmp $1 "mplayercXP.OGMFile" "${Index}-NoBackup"
WriteRegStr HKCR ".ogm" "backup_val" $1
"${Index}-NoBackup:"
WriteRegStr HKCR ".ogm" "" "mplayercXP.OGMFile"
ReadRegStr $0 HKCR "mplayercXP.OGMFile" ""
StrCmp $0 "" 0 "${Index}-Skip"
WriteRegStr HKCR "mplayercXP.OGMFile" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open"
WriteRegStr HKCR "mplayercXP.OGMFile\DefaultIcon" "" "$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe,0"
"${Index}-Skip:"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\open\command" "" \
'$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe "%1"'
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit\command" "" \
'$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe "%1"'
!undef Index

SectionEnd

;--------------------------------------------------------

What is wrong ????????

The file is in "$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe"

and it should set .ogm files to open with "mplayercXP.exe"
VegetaSan is offline   Reply With Quote
Old 8th February 2004, 10:56   #15
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
Got it allmost it gives a error insted of just skipping it

THIS IS THE ERROR
WriteRegStr expects 4 parameters, got 5.
Usage: WriteRegStr rootkey subkey entry_name new_value_string
root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD)
Error in script "C:\Documents and Settings\GokuSan\Bureaublad\ML + Wind and .NSI" on line 834 -- aborting creation process


and this is line 834 :
"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe "%1"'

what is wrong ??

please write the whole code down
VegetaSan is offline   Reply With Quote
Old 8th February 2004, 12:03   #16
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
You should quote the path inside the entire parameter:

code:
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open" '"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" "%1"'

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th February 2004, 12:34   #17
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
Still doesnt work

ERROR :
WriteRegStr expects 4 parameters, got 9. Wind and .NSI" on line 834 -- aborting creation process

SCRIPT
Section


!define Index "Line${__LINE__}"
ReadRegStr $1 HKCR ".ogm" ""
StrCmp $1 "" "${Index}-NoBackup"
StrCmp $1 "mplayercXP.OGMFile" "${Index}-NoBackup"
WriteRegStr HKCR ".ogm" "backup_val" $1
"${Index}-NoBackup:"
WriteRegStr HKCR ".ogm" "" "mplayercXP.OGMFile"
ReadRegStr $0 HKCR "mplayercXP.OGMFile" ""
StrCmp $0 "" 0 "${Index}-Skip"
WriteRegStr HKCR "mplayercXP.OGMFile" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open"
WriteRegStr HKCR "mplayercXP.OGMFile\DefaultIcon" "" "$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" ;,0"
"${Index}-Skip:"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\open\command" "" \
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open" '"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" "%1"'
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit\command" "" \
"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe ; "%1"'
!undef Index

SectionEnd


Line 834 :
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open" '"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" "%1"'
VegetaSan is offline   Reply With Quote
Old 8th February 2004, 12:39   #18
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "open" '"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" "%1"'

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th February 2004, 12:50   #19
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
The code you gave me is better but not good enough

ERROR
WriteRegStr expects 4 parameters, got 8.
on line 834 -- aborting creation process


Line 834
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "open" '"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" "%1"'
VegetaSan is offline   Reply With Quote
Old 8th February 2004, 12:56   #20
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
You must be copying it wrong. It works fine here.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th February 2004, 13:05   #21
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
Nope I dont know why :::

Section

!define Index "Line${__LINE__}"
ReadRegStr $1 HKCR ".ogm" ""
StrCmp $1 "" "${Index}-NoBackup"
StrCmp $1 "mplayercXP.OGMFile" "${Index}-NoBackup"
WriteRegStr HKCR ".ogm" "backup_val" $1
"${Index}-NoBackup:"
WriteRegStr HKCR ".ogm" "" "mplayercXP.OGMFile"
ReadRegStr $0 HKCR "mplayercXP.OGMFile" ""
StrCmp $0 "" 0 "${Index}-Skip"
WriteRegStr HKCR "mplayercXP.OGMFile" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open"
WriteRegStr HKCR "mplayercXP.OGMFile\DefaultIcon" "" "$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" ;,0"
"${Index}-Skip:"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\open\command" "" \
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "open" '"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" "%1"'
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit\command" "" \
"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe ; "%1"'
!undef Index

SectionEnd

Could you look at this maybe there is something wrong with the other lines
VegetaSan is offline   Reply With Quote
Old 8th February 2004, 13:09   #22
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
You have a backslash on the line before. That means the next line will be appended to it. Remove the backslash.

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th February 2004, 13:25   #23
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
ERROR ON LINE 833
;LINE 832
"${Index}-Skip:"
;LINE 833
WriteRegStr HKCR "mplayercXP.OGMFile\shell\open\command" ""

ERROR =
WriteRegStr expects 4 parameters, got 2.
on line 833 -- aborting creation process



ONoTHER ErroR , Man this never stops


WHOLE SCRIPT :

Section

!define Index "Line${__LINE__}"
ReadRegStr $1 HKCR ".ogm" ""
StrCmp $1 "" "${Index}-NoBackup"
StrCmp $1 "mplayercXP.OGMFile" "${Index}-NoBackup"
WriteRegStr HKCR ".ogm" "backup_val" $1
"${Index}-NoBackup:"
WriteRegStr HKCR ".ogm" "" "mplayercXP.OGMFile"
ReadRegStr $0 HKCR "mplayercXP.OGMFile" ""
StrCmp $0 "" 0 "${Index}-Skip"
WriteRegStr HKCR "mplayercXP.OGMFile" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open"
WriteRegStr HKCR "mplayercXP.OGMFile\DefaultIcon" "" "$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" ; ,0"
"${Index}-Skip:"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\open\command" ""
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "open" '"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" "%1"'
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\edit\command" "" \
"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe "%1"'
!undef Index

SectionEnd
VegetaSan is offline   Reply With Quote
Old 8th February 2004, 13:30   #24
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
It would have never started had you only changed what's needed.

!define Index "Line${__LINE__}"
ReadRegStr $1 HKCR ".ogm" ""
StrCmp $1 "" "${Index}-NoBackup"
StrCmp $1 "mplayercXP.OGMFile" "${Index}-NoBackup"
WriteRegStr HKCR ".ogm" "backup_val" $1
"${Index}-NoBackup:"
WriteRegStr HKCR ".ogm" "" "mplayercXP.OGMFile"
ReadRegStr $0 HKCR "mplayercXP.OGMFile" ""
StrCmp $0 "" 0 "${Index}-Skip"
WriteRegStr HKCR "mplayercXP.OGMFile" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open"
WriteRegStr HKCR "mplayercXP.OGMFile\DefaultIcon" "" "$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe,0"
"${Index}-Skip:"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\open\command" "" '"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" "%1"'
!undef Index

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th February 2004, 13:47   #25
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
If this is the script code then it isnt right. I can run the installer succsesfully. But when I open .ogm files then it will open with Windows Media Player insted of "mplayercXP.exe"

Section

!define Index "Line${__LINE__}"
ReadRegStr $1 HKCR ".ogm" ""
StrCmp $1 "" "${Index}-NoBackup"
StrCmp $1 "mplayercXP.OGMFile" "${Index}-NoBackup"
WriteRegStr HKCR ".ogm" "backup_val" $1
"${Index}-NoBackup:"
WriteRegStr HKCR ".ogm" "" "mplayercXP.OGMFile"
ReadRegStr $0 HKCR "mplayercXP.OGMFile" ""
StrCmp $0 "" 0 "${Index}-Skip"
WriteRegStr HKCR "mplayercXP.OGMFile" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open"
WriteRegStr HKCR "mplayercXP.OGMFile\DefaultIcon" "" "$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe,0"
"${Index}-Skip:"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\open\command" "" '"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" "%1"'
!undef Index

SectionEnd
VegetaSan is offline   Reply With Quote
Old 8th February 2004, 14:30   #26
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,337
Have you tried rebootin? Have you made sure Windows Media Player didn't revert the change (open regedit.exe and look under HKCR\.ogm)?

NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 8th February 2004, 16:17   #27
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
It wont work (it doesnt give a error but it doenst work)

[size=1]Section

DeleteRegKey HKLM "Software\Classes\.ogm\*.*"
!define Index "Line${__LINE__}"
ReadRegStr $1 HKCR ".ogm" ""
StrCmp $1 "" "${Index}-NoBackup"
StrCmp $1 "mplayercXP.OGMFile" "${Index}-NoBackup"
WriteRegStr HKCR ".ogm" "backup_val" $1
"${Index}-NoBackup:"
WriteRegStr HKCR ".ogm" "" "mplayercXP.OGMFile"
ReadRegStr $0 HKCR "mplayercXP.OGMFile" ""
StrCmp $0 "" 0 "${Index}-Skip"
WriteRegStr HKCR "mplayercXP.OGMFile" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open"
WriteRegStr HKCR "mplayercXP.OGMFile\DefaultIcon" "" "$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe,0"
"${Index}-Skip:"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\open\command" "" '"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" "%1"'
!undef Index

SectionEnd

And is this right:
DeleteRegKey HKLM "Software\Classes\.ogm\*.*"
VegetaSan is offline   Reply With Quote
Old 8th February 2004, 18:16   #28
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
SomeBody help (AND I DONT NEED KICHIK's HELP)
VegetaSan is offline   Reply With Quote
Old 8th February 2004, 19:02   #29
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
Can you post the values of all relevent registry keys and describe the behavior or error messages when opening the media file?
Joost Verburg is offline   Reply With Quote
Old 8th February 2004, 19:24   #30
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
I want that my installer sets .ogm files to open with
mplayercXP.exe insted of Windows Media Player How do I do that

I Have done this with this script.. I can Run the installer but when I open .ogm files then it still opens with Windows Media Player insted of mplayercXP.exe

Info :
FileName : "mplayercXP.exe"
Directory : "$PROGRAMFILES\a-S Media Player Classic"

Script
Section

!define Index "Line${__LINE__}"
ReadRegStr $1 HKCR ".ogm" ""
StrCmp $1 "" "${Index}-NoBackup"
StrCmp $1 "mplayercXP.OGMFile" "${Index}-NoBackup"
WriteRegStr HKCR ".ogm" "backup_val" $1
"${Index}-NoBackup:"
WriteRegStr HKCR ".ogm" "" "mplayercXP.OGMFile"
ReadRegStr $0 HKCR "mplayercXP.OGMFile" ""
StrCmp $0 "" 0 "${Index}-Skip"
WriteRegStr HKCR "mplayercXP.OGMFile" "" "Media Player Classic .OGM File"
WriteRegStr HKCR "mplayercXP.OGMFile\shell" "" "open"
WriteRegStr HKCR "mplayercXP.OGMFile\DefaultIcon" "" "$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe,0"
"${Index}-Skip:"
WriteRegStr HKCR "mplayercXP.OGMFile\shell\open\command" "" '"$PROGRAMFILES\a-S Media Player ClassicXP\mplayercXP.exe" "%1"'
DeleteRegKey HKCU "SOFTWARE\Classes\.ogm"
!undef Index

SectionEnd
VegetaSan is offline   Reply With Quote
Old 8th February 2004, 20:34   #31
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
VALUE :

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.ogm]
@="mplayercXP.OGMFile"
"backup_val"="Ogg File (*.ogg)"

[HKEY_CLASSES_ROOT\.ogm\ShellEx]

[HKEY_CLASSES_ROOT\.ogm\ShellEx\{BB2E617C-0920-11D1-9A0B-00C04FC2D6C1}]
@="{c5a40261-cd64-4ccf-84cb-c394da41d590}"


BEHAVIOR :

If I open the .ogm file then Windows Media Player will pop-up and say that he could not read the file. That is why I need to open it with "mplayercXP.exe"
VegetaSan is offline   Reply With Quote
Old 9th February 2004, 16:00   #32
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
YO Guys help please !!
VegetaSan is offline   Reply With Quote
Old 9th February 2004, 16:56   #33
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
I have this problem ......


I want to have a custom Header in my installer (MODERN UI INSTALLER)
And I allready have made a GRAND search in the Web, Manual and Examples.
I found this in the MODERN UI (HeaderBitMap.nsi) example and I want to replace it with a custom one how do I do that ???


I found this :

!define MUI_HEADERIMAGE
VegetaSan is offline   Reply With Quote
Old 9th February 2004, 16:58   #34
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
sorry I needed to start a new Topic

Just keep this tread in my previous question
VegetaSan is offline   Reply With Quote
Old 10th February 2004, 19:10   #35
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
THE .ogm Script !!!!!!!!

If you want to download this attached file and look at it and please say what is wrong Please.....

I have put some things you must know in the installer

You dont have to donwload if you dont want to

I will search in the Web, Forum and Manual if I didnt find anything I will return to the forum and see for any replies .....

Thanks
Attached Files
File Type: nsi .ogm script.nsi (1.7 KB, 45 views)
VegetaSan is offline   Reply With Quote
Old 11th February 2004, 14:46   #36
VegetaSan
Senior Member
 
VegetaSan's Avatar
 
Join Date: Jan 2004
Location: The Netherlands
Posts: 260
I didnt find anything in Google so could you please tell me what to do are or what word I need to use in the Manual
VegetaSan is offline   Reply With Quote
Reply
Go Back   Winamp Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump