Klexen Posted June 26, 2007 Share Posted June 26, 2007 (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 June 26, 2007 by Klexen Link to comment Share on other sites More sharing options...
Klexen Posted June 26, 2007 Author Share Posted June 26, 2007 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\Ð[ÙÉÌ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Ç($%¹%($%¹% Link to comment Share on other sites More sharing options...
enaiman Posted June 26, 2007 Share Posted June 26, 2007 (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 June 26, 2007 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 :) Link to comment Share on other sites More sharing options...
smashly Posted June 26, 2007 Share Posted June 26, 2007 (edited) Maybe you could try setting the Working Directory in the shortcut parameter FileCreateShortcut($File_Location2, @StartupCommonDir & "	ÔÝ][ÚÉ][ÝËØÜ Cheers Edited June 26, 2007 by smashly Link to comment Share on other sites More sharing options...
Klexen Posted June 26, 2007 Author Share Posted June 26, 2007 Maybe you could try setting the Working Directory in the shortcut parameter FileCreateShortcut($File_Location2, @StartupCommonDir & " ÔÝ][ÚÉ][ÝËØÜ Cheers That worked great.. Thanks! Link to comment Share on other sites More sharing options...
smashly Posted June 26, 2007 Share Posted June 26, 2007 Your welcome Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now