-
I have a problem ->
When i create icon in the start menu and i create it under the programs group, it works fine,and i can also create icon on the desktop. But if i go a group futher,like accessories,no icon are created(both the start menu and the desktop).
Does somebody know what's happening??
-
hmm
Hi there,
Sorry I dont have an awnser to your question...
I have a question :-)
You said that you could create shortcuts on the desktop..
How??? API??
-
If you would post a copy of the working and non working code and I will take a look at it.
-
for dhugal
-
my code
that my sub:
Code:
Sub create_icon()
'create the icon in the selected group
On Error GoTo EH
Dim x As Integer
Dim strProgramPath As String ' The path of the executable file
Dim strGroup As String
Dim strProgramIconTitle As String
Dim strProgramArgs As String
Dim sParent As String
MkDir start_group_path & "\ISI Databases" 'this make a new folder in the selected group
strGroup = "ISI Databases"
strProgramArgs = ""
sParent = "$(" & group_parent & ")"
'group_parent is the folder above the selected group
'ex:programs ->group_parent=start menu
For x = 0 To UBound(component)
strProgramPath = Destination & "\" & component(x) & ".exe"
strProgramIconTitle = component(x)
CreateShellLink strProgramPath, strGroup, strProgramArgs, strProgramIconTitle, True, sParent
ProgressBar1.Value = ProgressBar1.Value + 1
Label2.Caption = ((ProgressBar1.Value * 100) \ ProgressBar1.Max) & "%"
Label2.Refresh
Next x
Exit Sub
EH:
MsgBox Err.Description
Resume Next
End Sub
-
assuming everything else is working fine you need to change one thing.
From:
Code:
strGroup = "ISI Databases"
To:
Code:
strGroup = ".\ISI Databases"
Hope that helps,
KillemAll
-
ok ill try...but
How did i do to put the smilie face in my thread???
-
still don't work
i try it and it does it work,
dunno why????
-
hmmm
first off, that particular smiley is as a result of an "p" imediately following a ":" like this :p . You can disable this when you post by clicking on the "Disable Smilies in This Post" checkbox just above the buttons and below the reply window.
Now back to the problem at hand. Is the directory being created? The directory must exist for the icon to be created. If the directory is not created then it is likey a problem with the value of "start_group_path". Where and how are you setting that value?
I would create the directory manually then test it if that works the only thing you need to do is fix the fact that the MKDir is not working properly.
-
it is created
My folder is created,
But is empty,and when i want to put it in the start menu or programs it work,it's confusing!!@????
-
hmmmm
Try replacing...
Code:
sParent = "$(" & group_parent & ")"
with...
Code:
sParent = "$(Programs)"
if that does not work can you post the project somewhere or email it to me? let me know how big it is before you email it though. Since I did not have all of the code and forms I cut out alot of it and just used the basic stuff and it worked fine. so I need more of your code to figure it out.
-
ok
I'll send you my code(zipped)
Hope that you don't get lost in it.
-
I went through it. It worked for me. The only things I did was rem out some lines that I didn't want to run, as follows:
'copy_tlb
'copy_exe 'copy the .exe of all the selected component
'copy_dll
'copy_ocx
'copy_dbase
'write_reg
'write_path_reg
and change the one line I mentioned earlier
strGroup = ".\ISI Databases"
It was still in there as "ISI Databases". Once I added the .\ to it, it worked just fine.
try it again and let me know if you still have problems.
-
you mean...
When you try it , did you try to put it in the accessories,cuz i try again and still don't work(the folder is created but it's empty)I don't know why it work for you??
For me it work only if i pet it in start menu or programs!