/build/static/layout/Breadcrumb_cap_w.png

Create url shortcut on desktop using WiseScript.

Create a desktop shortcut in all users profile to point to www.appdeploy.com. [/align]if machine already has the www.appdeploy.com shortcut on desktop. exit saying shortcut is already there.[/align]
[/align]


If anyone help on this , thanks in advance.

0 Comments   [ + ] Show comments

Answers (21)

Posted by: sourav 14 years ago
Orange Senior Belt
0
Please can anyone help on this.
Posted by: turbokitty 14 years ago
6th Degree Black Belt
0
How are you deploying this and why are you using Wscript?

Why don't you just use the login script and a pre-created lnk file on some server share?

I don't know Wscript.. I only use vbs as it's vendor-neutral. I'm sure someone will help if you're set on it but don't expect an answer in 30 mins!
Posted by: michaelnowell 14 years ago
Second Degree Blue Belt
0
I would simply just create the .url itself on the desktop.

A .url is simply an .ini file.

Simply create a file called %filename%.url with the following ini lines

[InternetShortcut]
URL=http://www.appdeploy.com

Alternatively, if you're using Windows Installer Editor (within Wise) you can just add this to the ini file table
Posted by: shalinispillai 14 years ago
Senior Yellow Belt
0
If you want to check if the url already exists using wise script editor, u may use the "check if file\dir exists" option and exit the installation.
here is a vb script which will create the desktop url:

On Error Resume Next
Set objShell = WScript.CreateObject("WScript.Shell")
strDesktopFolder = objShell.SpecialFolders("AllUsersDesktop")
Set objShortCut = objShell.CreateShortcut(strDesktopFolder & _
"\Appdeploy.lnk")
objShortCut.TargetPath = chr(34) & "http://www.appdeploy.com" & chr(34)
ObjShortCut.IconLocation = ", 0"
objShortCut.WorkingDirectory = "http://www.appdeploy.com"
objShortCut.Save

hope this works!
Posted by: dj_xest 14 years ago
5th Degree Black Belt
0
Hi,

In addition to Shalinispillai... you can use the "Create Shortcut" action in wisescript so that you don´t need the vbscript.
Posted by: ramesh111k 14 years ago
Purple Belt
0
If you want a wise script, I can help you out in some way. Please check if this helps in solving your issue.

1. Use "Set variable" option and give variable as URLVERSION
2. Use "Set variable" option and give variable as SHORTCUTPATH and value "C:\Documents and Settings\All Users\Desktop"
3. Use "If File Exists" and give pathname is "%SHORTCUTPATH%\xxx.url" and give some text in title and some message in message text.
4. Use "Else" option
5. Use "Create shortcut" option. (not sure whether this option works for you because you have to give the source path) or Use "Install file" option to copy the shortcut from this compiled exe to distination.

Hope this helps your issue or requirement.

Regards
Ramesh
Posted by: anonymous_9363 14 years ago
Red Belt
0
How hard can it be? 'Search for File', 'If' (test variable content), 'Create Shortcut'.

To be perfectly frank - and please take this in the spirit in which it's intended - if you can't work out how to do this from the options in front of you in the Wise editor and the dialogs that result from their selection, then you should really be looking for an alternative career.

BTW, in spite of the practices of vendors who should know better, the Desktop is no place for such shortcuts. Use the Start menu.
Posted by: sourav 14 years ago
Orange Senior Belt
0
shalinispillai : Thanks for your reply..yes it's working.. but i need to do it only in WiseScript.

Ramesh111k : yes ramesh your comment make sence,

but i tried creating shortcut by shortcut page in WiseScript Editor(ver 9. ) as follows :

create shortcut page:

Source Path : www.appdeploy.com
Destination Path : %ALLUSERSPROFILE%\DESKTOP\appdeploy.url
command Options : null
Default Directory : %allusersprofiles%
Description : null
Icon pathname : path\xx\

by this am not able to create shortcut.
Am i doing right?
Members please correct me.
Thanks,
Posted by: anonymous_9363 14 years ago
Red Belt
0
Am i doing right?A cursory read of the WiseScript help file will tell you that, in order to use an environment variable in script, you need to create a WiseScript variable, populate that from the environment variable and then use the WiseScript variable in your script.
Posted by: shalinispillai 14 years ago
Senior Yellow Belt
0
Hi,

As mentioned above, u need to declare the environment variable. Follow the steps below:

1. Select "Get Environment Variable" option in WSE, and enter "ALLUSERSPROFILE" and store it in any variable name . eg:"ALLUSERSPROFILE"

2. Select "Create Shortcut" option and give the following options:

Source Path : http://www.appdeploy.com
Destination Path : %ALLUSERSPROFILE%\Desktop\appdeploy.lnk
command Options : null
Default Directory : %ALLUSERSPROFILE%
Description : Appdeploy
Posted by: sourav 14 years ago
Orange Senior Belt
0
shalinispillai : Thanks

i did as you mentioned , but it is not creating shortcut on desktop.



Thanks for your further help.

Thanks
Posted by: shalinispillai 14 years ago
Senior Yellow Belt
0
Hi Sourav,

It should ideally create shortcut on desktop if u have followed the steps. Kindly ensure that you have used the variable declared in "get env var", in the create shortcut tabs also.
Posted by: turbokitty 14 years ago
6th Degree Black Belt
0
I don't use Wise unless I'm forced to, but there must be a canned Wise variable for the user's desktop??
Posted by: sourav 14 years ago
Orange Senior Belt
0
Yes shalinispillai, i did same..

item: Get Environment Variable
Variable=ALLUSERSPROFILE
Environment=ALLUSERSPROFILE
end
item: Create Shortcut
Source=http:\\www.appdeploy.com
Destination=%ALLUSERSPROFILE%\Desktop\appdeploy.url
Working Directory=%ALLUSERSPROFILE%
Description=appdeploy
Key Type=1536
Flags=00000001
end

but it is not creating shortcut.
Posted by: shalinispillai 14 years ago
Senior Yellow Belt
0
Use .lnk instead of .url. It will work.
Posted by: elgwhoppo 14 years ago
Senior Purple Belt
0
Not sure why you'd use WiseScript for something this simple. Here's a VBScript that does exactly what you want.

If the file doesn't exist, it makes it. Take out the IF and END if you want it to overwrite.

Set sho = Wscript.CreateObject("Wscript.Shell")
Set fso = wscript.CreateObject("Scripting.FileSystemObject")
strAllUsersProfile = sho.expandenvironmentstrings("%AllUsersProfile%")
If NOT fso.fileexists (strAllUsersProfile & "\Desktop\Appdeploy.URL") then
Set oLink = fso.CreateTextFile(strAllUsersProfile & "\Desktop\Appdeploy.URL", True)
oLink.WriteLine("[InternetShortcut]")
oLink.WriteLine("URL=http://www.appdeploy.com")
oLink.Close
End If
Posted by: sourav 14 years ago
Orange Senior Belt
0
.lnk

shalini i tried .lnk but no luck. :-(


elgwhoppo thanks.
Posted by: elgwhoppo 14 years ago
Senior Purple Belt
0
No problem, glad it helped.

I usually prefer VB script to Wise because it's native to the OS, a easier to incorporate WMI queries and opens with notepad.

Plus you can't decompile a wisescript. It can be really annoying to come across a wisescript with no corresponding .WSE file. I started out with Wise and mvoed up to VB.
Posted by: anonymous_9363 14 years ago
Red Belt
0
- Please don't hijack threads. As this is a scripting question, please start a new thread in the 'Scripting' forum. http://www.appdeploy.com/messageboards/tt.asp?forumid=6&p=&tmode=1&smode=1

- Please use the CODE tags when posting code (or lengthy text). You can access the tag by clicking the button marked '<%' in the 'Post New Thread' or 'Reply to Message' windows.
Posted by: MSIPackager 14 years ago
3rd Degree Black Belt
0
I do know how to open a URL using a VB script but the problem is cant enter the username, password and login automatically can you help with me that.

I can help you with that: use Firefox.
Posted by: XpressMusic 14 years ago
Yellow Belt
-1
I know nothing much abt VB and trying to learn so please consider me as trainee and help with the below problems :)

I do know how to open a URL using a VB script but the problem is cant enter the username, password and login automatically can you help with me that. Below is the pasted example script let me know if its my bad

set IE=CreateObject("InternetExplorer.application")
IE.Visible=TRUE
IcUrl="http:\\www.gmail.com"
SetUsr = InputBox("Please Enter Your Username")
SetPas = InputBox("Please Enter Your Password")


IE.Navigate(IcUrl)
'IE.quit
'Set IE=Nothing
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ