Sign in to follow this  
Followers 0
Klexen

Create shortcut

6 posts in this topic

#1 ·  Posted (edited)

Basically what I want to do is when my program is run first time, it will create a shortcut of the exec in my startup.

EDIT:: Wow I never thought there would be a FileCreateShortcut Command.. Sorry for the waste of thread!

Edited by Klexen

Share this post


Link to post
Share on other sites



Ok still need help...

The shortcut creates just fine, however when the program runs it does not use the ini file my program uses... If I run the program directly(not through shortcut) the program functions correctly. What arguements would I need to use to make it use the ini file? I don't get why it doesn't work the way it is.. The shortcut launches the SuperLaunch.exe.

Dim $File_Location2 = @ScriptDir & "\SuperLaunch.exe"

FileCreateShortcut($File_Location2, "C:\Documents and Settings\All Users\Start Menu\Programs\Startup" & "\SuperLaunch.lnk")

Here is the whole beginning of my program.

;-------Sets Location for config file-------
Dim $data_Location = @Scr   [È ][ÝÉÌLÑ]IÌLÉ][ÝÂ[H  ÌÍÑ[WÓØØ][ÛHØÜ"fײgV÷C²b3#´FFb3#¶FVÆÇV6¶ÆVæ6æægV÷C° ¤FÒb33c´fÆUôÆöÑ¥½¸ÈôMÉ¥ÁѥȵÀìÅÕ½ÐìÀäÈíMÕÁÉ1Õ¹ ¹áÅÕ½Ðì()!½Ñ-åMÐ ÅÕ½;+{F3}","SetRes")

;-------Checks to see if Directory ExistsYÝÜX]È]KKKKKKBÙ]Ú^J   ÌÍÙ]WÓØØ][ÛBYÜHHà¤F$7&VFRb33c¶FFôÆö6Föâ¤VæD` ¤bfÆTW7G2gV÷C´3¢b3#´Fö7VÖVç̹MÑÑ¥¹ÌÀäÈí±°UÍÉÌÀäÈíMÑÉÐ5¹ÔÀäÈíAɽɵÌÀäÈíMÑÉÑÕÀÀ2;qres.bat") Then filedelete("C:\Documents and Settings&#092Ð[ÙÉÌLÔÝY[IÌLÔÙÜ[ÉÌLÔÝ   ÌLÜË]    ][ÝÊBbfÆTW7G2gV÷C´3¢b3#´Fö7VÖVçG2æB6WGFæw2b3#´ÆÂW6W'2b3#µ7F'5¹ÔÀäÈíAɽɵÌÀäÈíMÑÉÑÕÀÀäÈíMÕÁÉ1Õ¹ ¹±¹¬ÅÕ½Ðì¤Q¡¸()±Í(À6;StartupAsk = MsgBox(4,"Add to Startup?","Would you like to add me to your startup?")
    If $StartupAsk = 6 Then
        FileCreateShortcut($File_Locat[Û   ][ÝÐÎÌLÑØÝ[Y[È[Ù][ÜÉÌLÐ[ÙÉÌLÔÝY[IÌ#µ&öw&×2b3#µ7F'GWgV÷C²fײgV÷C²b3#µ7WW$ÆVæ6æÆæ²gV÷C² VÇ($%¹%($%¹%

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

The explanation could be that the @ScriptDir you're using is not the same - it seem to be pointing elsewhere => your ini file is not found.

EDIT:

tested your code and it works just fine - dunno why you are not able to use the ini file

It would be better for you to use the SciTE option to add trace line and to trace script execution just to see what is happening.

Edited by enaiman

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Maybe you could try setting the Working Directory in the shortcut parameter

FileCreateShortcut($File_Location2, @StartupCommonDir & "&#09ÔÝ][ÚÉ][ÝËØÜ

Cheers

Edited by smashly

Share this post


Link to post
Share on other sites

Maybe you could try setting the Working Directory in the shortcut parameter

FileCreateShortcut($File_Location2, @StartupCommonDir & "   ÔÝ][ÚÉ][ÝËØÜ

Cheers

That worked great.. Thanks!

Share this post


Link to post
Share on other sites

Your welcome :rolleyes:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0