/build/static/layout/Breadcrumb_cap_w.png

script not working

Hi, we are trying to run below script. At the time of installation, before install finalize, but it is not working.

Please guide.


on error resume next
Set WshShell = WScript.CreateObject("WScript.Shell")
wshshell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pdf\","REG_SZ"
wshshell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pdf\","MiKTeX.sty.2.8","REG_SZ"
wshshell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pdf\Content Type", "application/pdf", "REG_SZ"
wshshell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pdf\MiKTeX.sty.2.8\","REG_SZ"
wshshell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.pdf\MiKTeX.sty.2.8\ShellNew\","REG_SZ"


0 Comments   [ + ] Show comments

Answers (5)

Posted by: WSPPackager 13 years ago
Senior Purple Belt
0
Hi

Why do you want to use the script? Why dont you add all these registry keys directly in msi?

You can try using WMI. For more detials http://msdn.microsoft.com/en-us/library/aa394600(VS.85).aspx

I would rather use the .reg file with regedit.exe
Posted by: pjgeutjens 13 years ago
Red Belt
0
Set WshShell = WScript.CreateObject("WScript.Shell")

the WScript part won't work in an MSI. Just delete it


Set WshShell = CreateObject("Wscript.shell")



Why do you want to use the script? Why dont you add all these registry keys directly in msi?


also very true [:D]
Posted by: anonymous_9363 13 years ago
Red Belt
0
the WScript part won't work in an MSIThat's only true for embedded script. If it's called externally (or extracted from the Binary table), it's fine.

The app is clearly taking over the .PDF extension so perhaps the script is recording which application it's currently assigned to so that that can be reinstated when this app is uninstalled. Right? [oink, flap...]

As to use of script versus the Registry table, the OP should be aware that he/she should build a "sister" CA for uninstallation anyway, if only to remove the association.
Posted by: Packagingteam 13 years ago
Orange Belt
0
Yes script is being used for the same reason, to install and remove .pdf extension externally, because through msi it is not behaving as expected. Thanks pjgeutjens for figuring out the bug.
Only one thing we are not able to achieve, that is file association with icon. [We are not getting perticular registry] We are working on it.
Posted by: pjgeutjens 13 years ago
Red Belt
0
Only one thing we are not able to achieve, that is file association with icon. [We are not getting perticular registry] We are working on it.

Might be mistaken here but I think the logic goes like this (I'll use a Word 2007 document as example):

HKCR\.docx\(Default) = Word.Document.12
HKCR\Word.Document.12\Shell\Open\Command\(Default) = "C:\Program Files\Microsoft Office\Office14\WINWORD.EXE" /n "%1"
HKCR\Word.Document.12\DefaultIcon\(default) = blabla path to icon (.ico or .exe,number of contained icon)

so the default for the extension gives you the document type, open-command and icon are then defined in HKCR\<document type>

I'd say give it a whirl, let me know how it works out (I'm at home and don't feel like messing with my word doc associations on this machine [:D])

PJ
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ