Does anybody know what's wrong with this, in order to create a shortcut in Startup:
Code:
TCHAR szDir[MAX_PATH];
SHGetSpecialFolderPath(NULL, szDir, CSIDL_STARTUP , FALSE);
lstrcat(szDir, TEXT("\\myApp.lnk"));
SHCreateShortcut(szDir, TEXT("\\myApp.exe"));
It does create a Shortcut in Startup, but for a file, not for an exe. If one inserts a shortcut into Startup manually, all is fine. With the code above, there is even a different icon.
Any ideas?
And: how can one delete that link again programmatically?
Related
Guys, don't get excited, this is just a teeny tiny app for a special request:
http://forum.xda-developers.com/viewtopic.php?t=50460&start=0&postdays=0&postorder=asc&highlight=
I'm basically not releasing anything for a while whilst I work on my new website, which is taking ages
However, this app is just used to launch an app in the same folder, with the filename
VJTarget.exe
or a shortcut called VJTarget.lnk.
This is very specific in use. You don't need it, I'm sure.
But if you have an app that can launch an .exe, but won't launch a shortcut with a command line, then this might be for you (I know some button redefiners and Today launchers might get use out of this)
So, basically, if you want to run VJDialer with a command line in TomTom:
1. Create a shortcut to VJDialer and set it up as you normally would.
2. Check the shortcut to ensure it works.
3. Copy it to your target folder.
4. Copy VJBrisk.exe to the same target folder.
5. Rename the shortcut you made in Step 1 to VJTarget.lnk.
6. Running VJBrisk will now launch VJTarget with its command line etc.
So, setup TomTom to run VJBrisk, and VJBrisk will then launch a file called VJTarget.exe or VJTarget.lnk in the same folder.
Like I said, very specific, but a good experiment for me with some nice string classes
On my (old) website.
V
Thanx!
I will rewrite my question here, because it's + appropriated:
i will try NOW your app.... only a question:
VJbrisk.exe launch only one vjtarget.lnk or just rename it (exe) with the same name of the link to have more than 1 phone link?
(es Vjbrisk1.exe call Vjbrisk1.lnk, Vjbrisk2.exe call VJbrisk2.lnk etc ?
sorry 4 my english
:::EDIT:::::
i HAVE AN IDEA!
If a Vjbrisk.exe read from a text file vjtarget.txt :
links = 2
link1: vjdial.exe 123456789;
link2: vjdial.exe 987654321;
then by renaming as Vjbrisk1.exe or vjbrisk2.exe the program execute the link into the txt?
the counter is for vjbrisc[X].exe, from x=1 to x=[links].....
or the exe filename can be compared with a string written into the txt:
"VBrisk1.exe" = vjdial.exe 123456789
"VBrisk2.exe" = vjdial.exe 123456789
I don't know is it's possible.... however good work for all others apps that you've made !
VJBrisk will launch VJTarget.exe or VJTarget.lnk.
I could make it so that renaming VJBrisk Eg VJBrisk2.exe will launch VJTarget2.exe.
But for your TomTom setup, I suggest you just use a different folder and a different copy of VJBrisk for each app you need to run.
The text file option is possible, but may be more complicated then just renaming the .exe as I describe above.
V
ok thnx 1000
accidental presses solved
thanks again to kokotas and vijay555.
kokotas for his ROM that allows me to replace \windows\biotouch.exe without difficulty
vijay555 for his VJBrisk that allows a "new biotouch.exe" to launch a shortcut to s2u2.exe
this means slide2unlock2 will remain locked, even if there are accidental presses/brushes(due to hardware design) while my elf is in my pocket.
Hi, Vijay.
Is there any chance that you could modify this app so that it would pass the command-line parameter it was launched with on to the shortcut?
Here's what i'm trying to acchieve:
I'm using a QR Code reader called quickmark that can read a URL from the barcode, and open it in a web browser. It can ce switched to use Opera instead of IE, but it attempts to launch the executable called OperaLaunch.exe from /Windows, while my Opera9 beta exec is on the storage card, and it's called Opera9.exe
I tried to create a shortcut to it, rename it to VJTarget.lnk, and place it in /Windows along with VJBrisk renamed to "OperaLaunch.exe". When i tried to access a web page from quickmark, opera was launched, but it opened its home page, as if it didn't receive the command line parameter. Manualy running the link with URL as command line parameter worked fine, so it seems that VJBrisk doesn't pass the parameter...
[new version!] Command line support
mr_deimos - that's a really good idea. I don't know why I had never supported it before.
Can you please try this new version.
It's been years since I've made a cab, so for now, just a new .exe.
Let me know if it works ok for you.
VJBrisk 0.2 with command line support
V
Whoa, i didn't notice this version before. Thanks for making the update and sorry for the late reply.
However unfortunately it still doesn't seem to pass the command line parameters. Right now i don't have the opera9 anymore, but i tested it with netfront:
I have the vjbrisk.exe renamed to OperaLaunch.exe and vjtarget.lnk (pointing to my NetFront executable on storage card) in my /windows dir.
If i run:
Code:
\windows\vjtarget.lnk http://www.xda-developers.com
Netfront opens up, and loads the xda-dev website.
But ruunning:
Code:
\windows\operalaunch.lnk http://www.xda-developers.com
NetFronf fires up, but loads its homepage instead of this website Of course the same happens with QuickMark - it just launches NF, without loading the proper page.
vijay555 said:
mr_deimos - that's a really good idea. I don't know why I had never supported it before.
Can you please try this new version.
It's been years since I've made a cab, so for now, just a new .exe.
Let me know if it works ok for you.
VJBrisk 0.2 with command line support
V
Click to expand...
Click to collapse
it works fine, but can you make an option so that it is possible to use it multiple times in one directory =?
ex:
manila2d use on homescreen hardcoded:
-> clock.exe for timer+
-> calendar.exe for outlook calendar.
# # # #
now i want to use:
-> clock.exe for spb time
-> calendar.exe for thumbcal
so i overwrite calendar.exe + clock.exe with your tool(copy vjbrick.exe to calendar.exe + clock.exe) + make the link to vjtarget....
so how can handle your tool this for different targets ?
my idea would be that there is
1.) vjbrick.exe looks to its own exe-name and searching for a file with extension: ".vjb" . there the call is inside to the correct exefile + paramter
so for example:
1.) copy vjbrick.exe to calendar.exe + copy to windows(overwrite the orig file)
2.) generate a file calendar.vjb + inside there is: "programm files\thumbcal\thumbal.exe -day" + copy the file to \windows
manila2d->
THEREFORE: a lot of guys which are searching therefore a solution !!!!!!!!!!!
cu camel
Deprecated
Guys, VJBrisk has been updated and relaunched here
http://forum.xda-developers.com/showthread.php?p=3252253#post3252253
V
Hey Folks,
After some experimenting with MortScript, it's done.
I create a script that will automatically Change the gif files in S2U2 in a random Order.
---------------------------------------------------------------------------
########################
###S2U2 - Gif changer###
###Dr.Jeckyll - 2008 ###
########################
Repeat(9999)
If(ProcExists("iLock2.exe"))
Run("\Program Files\S2U2\iLock2.exe")
Sleep(1000)
SendOK()
EndIf
gif_nr = Rand(29) Change this Nr. to the number of gifs you want to use but +1
Copy("\Storage Card\My Pictures\"&%gif_nr%&".gif", "\Program Files\S2U2\gfx\Wallpaper.gif", TRUE) you can change the folder where the gif files are and you can change the installation folder of S2U2
Run("\Program Files\S2U2\iLock2.exe")
Sleep(3600000) every 1 hour the picture will change the time is in milliseconds
Run("\Program Files\S2U2\iLock2.exe")
Sleep(1500)
SendOK()
EndRepeat
--------------------------------------------------------------------------
Just copy the text between the lines in an empty document and rename it as S2U2GifChange.mscr
Installation:
1. Install MortScript, I use the latest beta from http://www.sto-helit.de/index.php?module=page&entry=ms_overview&action=view
2. Delete the iLock2.exe and the S2U2 exe from your Windows/Startup directory
3. Copy the script to the Startup directory.
4. Restart the device
You have to rename the gif files you would like to use to 1.gif, 2.gif, and so on, and you have to write the number of gifs +1 to the green marked point in the script.
When the message Ilock 2 and s2us are closed apperas, do nothing it will self close.
Thanks for the effort. Just my 2 cents:
This script will run resident all the time and take up valuable memory and processing power.I think instead of doing a repeat loop, a better way is to simply queue the script in the notification queue.
The first if condition after repeat is to quit ilock which is not necessary. There is a restart command line parameter for S2U2.
chris.wilcox has another version here http://forum.xda-developers.com/showthread.php?t=389397
hey, i just download the mortscropt and i a super noob and i change the wallpaper name with 1.gif 2.gif ect.., and the wallpaper are going to change randomly?????
How to make Phone Dialer pop up when using slider from TouchFlo/M2D home
I am a big fan of the SlideActions application here, but when you use a cooked ROM with TouchFlo2D / Manila2D the "Open Dialer when on homescreen" as Slide-Open-Action does not do due to a different process running in foreground.
The options discussed in the SlideAction thread are not really cool, they open the dialer application always - even if you're in writing a new mail just want to use the keypad to type text.
Not a clean solution, but a temporary workaround (until SlideActions will be updated?) will be using a tiny MortScript as helper:
Step 1:
Install MortScript on your phone and copy a new script (textfile with .mscr extension) on your phone containing these lines:
Code:
x = ActiveProcess()
If (x eq "Manila2D.exe")
Run( "\windows\vtkey.exe" )
EndIf
Step 2:
In SlideAction's "Advanced" tab, add MortScript.exe as custom action with the dropdown and type the full path and name of your newly created .mscr file in the Param field. Now in the Event dropdpwn select the On Open field and chose the Run radio. Finally change the On Close Event to Null.
Here we go: Now, everytime you open the slider, the script checks if Manila2D is in foreground, and if, opens the dialing application. When opening slider while writing an email or text message, nothing happens!
Enjoy!
MoritzN you are a genious!!! i had the same problem!!! now it's fixed and runs perfect!!! thank you for your help!!!
When i add STK service and STK UIPPC package, a shortcut is automatically placed in root my my start menu. The name of shortcut is based on service provider (in my case, its EasyAccess.lnk). Is there any way to define where the shortcut will be placed? I.e.: "\Windows\Start Menu\Programs\Tools"
I tried provxml, it didnt work. I guess the shortcut is created on first boot and provxml is executed prior to the shortcut being created.
p/s: I do not want to resolve to mortscript yet. (im keeping mortscript as last option)
Thanks in advance!
tidus18 said:
When i add STK service and STK UIPPC package, a shortcut is automatically placed in root my my start menu. The name of shortcut is based on service provider (in my case, its EasyAccess.lnk). Is there any way to define where the shortcut will be placed? I.e.: "\Windows\Start Menu\Programs\Tools"
I tried provxml, it didnt work. I guess the shortcut is created on first boot and provxml is executed prior to the shortcut being created.
p/s: I do not want to resolve to mortscript yet. (im keeping mortscript as last option)
Thanks in advance!
Click to expand...
Click to collapse
Use a program like agent ransack to search your entire kitchen for the text "EasyAccess.lnk". There must be a file you are missing somewhere. This will find all occurrences of the shortcut in provxmls, app.dats, etc.
http://www.mythicsoft.com/page.aspx?type=agentransack&page=home
hardcoded path
mwalt2 said:
Use a program like agent ransack to search your entire kitchen for the text "EasyAccess.lnk". There must be a file you are missing somewhere. This will find all occurrences of the shortcut in provxmls, app.dats, etc.
http://www.mythicsoft.com/page.aspx?type=agentransack&page=home
Click to expand...
Click to collapse
I have searched my entire kitchen and the paths are not in app nor provxml I missed. But as I initially suspected, the path is hard coded into STK_Service.dll. I found few paths as unicode, and I did try to insert the desired folder "\Tools" to the path. Unfortunately, Im a newbie when it comes to hexediting...my edited dll resulted in non-booting room.... Will try again and post update or any hex wiz can help me out please? That would be very much appreciated.
My target is to drop the new shortcut into "\Windows\Start Menu\Programs\Tools"
I also noticed the icon registry entry for the shortcut is also defined in the dll.
My steps was: Recmod the module - edited the paths - recmod and replace the original module in ext package. The original module is attached.
hi guys
i have the us model, t-mobile hd2 with original rom.
could someone tell me please if it is possible to change the left softkey "phone" button to a "lock" button, same as the left softkey on the start screen?
it might be like what is done here:
74. Add All Contacts to Home Screen Left Softkey
By default the left softkey on the the Sense home tab is coded to Phone which is pointless and a waste because you can get to the same Phone page by pressing the Send hardware key. Change it to the All People page (eliminating 2 taps) by using the following reg entry:
HKLM/Software/HTC/Manila
HomeLSKPath = !"\Windows\manila.exe" --switchtopage Manila://people\browserlayer\?.page
HomeLSKText = Contacts
but instead of going to the contacts page it would preform lock.
does anyone know if this is possible and if so what reg. changes i would make?
thanks very much
maybe if you change the path to \Windows\DeviceLock.exe?
like this:
HomeLSKPath = !"\Windows\DeviceLock.exe"
HomeLSKText = Lock
i had tried that and i got this error popup:
"The file 'DeviceLock' cannot be opened. Either it is not signed with a trusted certificate, or one of its complenents cannot be found. You might need to reinstall
or restore this file."
thanks
does the file DeviceLock.exe exist in your windows folder? maybe it has a different name. alternatively, try this:
Code:
HomeLSKPath = !"\Windows\Lock.lnk"
edit: just tried it myself, it works
DeviceLock.exe seems to be a ROM file (on my device it is), so this could cause that problem.
if that does not work, install BSBTweaks, in the "General" section activate "policies: allow unsigned apps". (<-- should not be necessary, as i am sure that all executables by microsoft are digitally signed )
thanks much for the ideas wergor
i do have the devicelock.exe, its lockdevice.exe on this phone.
i tried all combinations without any working. keep getting the error message.
im giving up.
thanks anyway
by the way, Graz looks fantastic.
hmmm....this shouldn't be such a problem...
1- have you tried (no ! or " " ):
Code:
HomeLSKPath =\Windows\DeviceLock.exe
HomeLSKText = Contacts
2- try this Lock.exe (extract the zip and place in the \Windows folder) -- totally safe; took it from Johcos' endkey and use it on my phone -- with the following:
Code:
HomeLSKPath =\Windows\Lock.exe
HomeLSKText = Contacts
i have tried all, with nothing working.
i believe its time for a hard reset.
thanks for all ideas