Page 1 of 1 1
Topic Options
#128762 - 2004-11-02 06:54 AM creating DUN connection shortcut on desktop
mabman Offline
Fresh Scripter

Registered: 2004-11-02
Posts: 11
Hi there. I'm new to KiXtart. I've done some searching on this question and haven't quite found what I'm looking for, so hopefully someone can help me.

I'm looking for a way to create a desktop shortcut for a dial-up connection (eg, programmatically doing what right-clicking on a connection and selecting "Create Shortcut" does). I've seen some info on creating desktop shortcuts for files, but not connections themselves, which are a little different.

As well, I'd like to be able to script this for Win95 - WinXP, so version-agnostic or version-specific advice would be appreciated.

Thanks in advance for your help.

Glenn

Top
#128763 - 2004-11-02 07:59 AM Re: creating DUN connection shortcut on desktop
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Hi Glenn and welcome to the board.

Can't say as I've seen that request here before, but I'll give you a pointer to maybe locate a solution.

Take a clean system that has never had this connection created before and use either a program named REGSHOT to compare the before and after settings in the Registry, or a similar program. Then you can easily replicate it with KiXtart.

If there is more to it then the Registry as in file changes as well then you may need another program such as the PC Magzine util InCtrl5 which watches both registry and file changes for any changes. I'm sure there are other apps and methods but this should easily help you to complete the task.

As far as the Windows 9x support that is starting to become real rare these days by the more experienced scripters here on the board, but between your own research and the skills of the scripters here on the board I'm sure it can be accomplished.

You can look either in the FAQ here on the board or on Google or similar search engine to locate and download REGSHOT.

Good luck and let us know how we can help further once you've gathered a little more information about the changes required.

Top
#128764 - 2004-11-02 08:48 AM Re: creating DUN connection shortcut on desktop
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Okay, found the current link for REGSHOT that worked for me.

Regshot
Home page re-director: http://regshot.yeah.net/
Apparent home page: http://the7thlab.mybesthost.com/

Regshot 1.7.2 src+bin download: http://the7thlab.mybesthost.com/regshot17_src_bin.zip

Download new version at:
http://regshot.yeah.net/
http://regshot.isd.md/
http://www.digitalnuke.com/

Quote:

Trick for newbabies:
Regshot can monitor "most" of the windows registry changes,Why is "most" ,not "all" ??
Yep,regshot can monitor almost "all" user application's changes done to the registry, but in Windows NT(2000,XP,2003) platform, user apps do not have enough privileges to "see" what System OS have done,
for example: If you are using XP,and change the xDSL Dialup password in the "network connections", and you have monitor the action with regshot, but after compare the 2 shots, you would find nothing happend ( , does windows save it else where ??
The answer is no, Windows does save the password (encrypted) in the Registry, but user just can not see it.
The solution is we should run regshot in a higher privileged level,here is how:
1.Open your services control panel,Make sure that your "Task scheduler" service is running and is using the "Local system" account.
2.Schedule a task with "at" command in a cmd shell:
at 18:22 /interactive "d:\tools\regshot.exe"
The time "18:22" is the current clock time(eg:18:20) plus 1 or 2 minutes , so you can wait task scheduler to run your regshot at 18:22
3. Wait 1 or 2 minutes,after the regshot runs, do the normal job .Remember, it is running with the "local system" privileges and can "see" the changes made by the system os. Guess where windows store the xDSL dialup password )

For more info , try search help in microsoft for "windows privileges","task schedule","regedt32", There may be more tricks...... There are even utils help you to run apps under special account....





And here is a freebie from Microsoft. Not as user-friendly, but should do the job.


Microsoft Installation Monitor
http://www.microsoft.com/windows2000/techinfo/reskit/tools/existing/instaler-o.asp

usage: INSTALER InstallationName
[-9] [-r] [-dAE] CommandLine...

where: InstallationName specifies a name for the installation. This is a required parameter.
-? Displays this message.

-9 specifies that GetVersion should lie and tell application
that it is running on Windows 95
-r specifies that attempts to do a wildcard scan of the root
directory of a drive should fail.
-d specifies one or more debugging message options
A - shows all errors
E - shows all debug events
C - shows all create API calls



InCtrl5, Version 1.0
http://www.devhood.com/tools/tool_details.aspx?tool_id=432


Total Uninstall
http://www.geocities.com/ggmartau/


InstallWatch records modifications made to your PC during the installation of software, hardware, or configuration changes.
InstallRite (which includes all the features of InstallWatch) provides "application cloning" as opposed to "disk cloning", simplifying software distribution.
http://www.epsilonsquared.com/


Top
#128765 - 2004-11-02 12:56 PM Re: creating DUN connection shortcut on desktop
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4562
Loc: USA
Try this...

Using WshShortCut udf ...

Code:

$=wshShortCut("DUN Test","%windir%\system32\RasPhone.exe","-d DUN Test")


Just replace "DUN Test" (two places) with whatever name you want to name the connection and to match the name of the dun entry.

I tested this with XP, so not sure about other OSs

Top
#128766 - 2004-11-03 04:54 PM Re: creating DUN connection shortcut on desktop
mabman Offline
Fresh Scripter

Registered: 2004-11-02
Posts: 11
Thanks for the replies. I did some more research, and I did find the solution as above. So, you can create a standard desktop shortcut with the following targets:

On Win9x (and I'm assuming ME as well, but I don't see any info for it specifically):

rundll32 c:\windows\system\rnaui.dll,RnaDial "Connection Name"

On Windows NT/2000/XP:

rasphone -d "Connection Name"


A bit nicer than mucking around with the registry, but I'll certainly keep that in mind for future reference.

I'm still convinced there's an un- (or poorly) documented way to do this programmatically, at least on XP, as the last option in XP's "Create New Connection" wizard for dial-up connections is a checkbox labelled "Create a Shortcut on the Desktop for this connection".

A further question about the WshShortCut udf - I take it this depends on certain methods from the Windows Scripting Host. However, I know that on Win9x the WSH isn't always installed (or is removed for security reasons). Is there an alternate way to do this or does the udf anticipate that (I've only taken a cursory glance at the code)?

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 874 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.149 seconds in which 0.101 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org