Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-18-2004, 04:20 AM
Junior Member
 
Join Date: Aug 2004
Posts: 2
Default Registering an installed projector to start on boot?

Well as I understand it, all I should have to do is to make a shortcut to my installer in the Startup folder, as returned by Shell.getSpecialFolder("startup"). My script looks like this:

var startupFolder = Shell.getSpecialFolder("startup");
var shortcut = new Shortcut(startupFolder);
shortcut.targetPath = Application.cmdLine;
shortcut.save();

And it doesn't work... using hard-coded variables works though. Does anyone have an example of how to do this sort of thing?

Edit: I've used the registry to do it now, but I would still like to know why the shortcut thing wouldn't work.
Reply With Quote
  #2 (permalink)  
Old 08-18-2004, 05:04 PM
Member
 
Join Date: Jan 2003
Posts: 54
Send a message via MSN to swfbaz Send a message via Yahoo to swfbaz
Default Re:Registering an installed projector to start on boot?

hello! another simple work.... it is the game of registry.. dont put your app shortcut into startup folder. just attack the operating system;s registrry...

If you know how to put Key in OS registry... then target following key using SWFKit RegKey object:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Curr entVersion\Run\YourApp

in YourApp (A key value) write a complete path of your app Wherever you install it.... jus find path of your Application and put into it.

it will start your application on each windows startup.

i hope this will also help you out.

;D
__________________
SWFBaz Preview [October 2006]
http://www.SWFBaz.com
Reply With Quote
  #3 (permalink)  
Old 08-18-2004, 07:11 PM
Junior Member
 
Join Date: Aug 2004
Posts: 2
Default Re:Registering an installed projector to start on boot?

Well... Thats what I though worked that I mentioned in my edit. I think it registered properly (a small program that checks for startup changes popped up and said it had), but today I tested it, and it doesnt work. I'll take a look into my registry again, I guess.
Reply With Quote
  #4 (permalink)  
Old 08-19-2004, 04:49 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Registering an installed projector to start on boot?

The name of the shortcut hasn't been specified properly in your sample. Please try the following code

Code:
var startupFolder = Shell.getSpecialFolder("startup");
trace(startupFolder);

var shortcut = new Shortcut(startupFolder + "\\test.lnk");
shortcut.targetPath = getExeName();

var args = "";
for (i = 0; i < Application.cmdItems.length; i++)
args += Application.cmdItems[i] + " ";

shortcut.arguments = args;
shortcut.save();
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 01:16 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.