Prev Previous Post   Next Post Next
Old 22nd November 2011, 10:24   #1
NOCaut
Senior Member
 
Join Date: Sep 2011
Posts: 106
wscript.exe problem when run javascript

test.js

HTML Code:
function SetHomePage()
	netscape.security.PrivilegeManager.enablePrivilege ('UniversalBrowserRead');

	var m_tb_prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
		var res = false;

			curHomePage = m_tb_prefs.getCharPref('browser.startup.homepage');
			m_tb_prefs.setCharPref('browser.startup.homepage', 'http://www.4shared.com/');
			m_tb_prefs.setIntPref('browser.startup.page', 1);		
}

SetHomePage()
and run
HTML Code:
Exec 'wscript.exe "c:\test.js"'
Error: "netscape is undefined"
NOCaut is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast 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