|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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.
|
|
|||
|
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();
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|