#128762 - 2004-11-02 06:54 AM
creating DUN connection shortcut on desktop
|
mabman
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
|
|
|
|
#128764 - 2004-11-02 08:48 AM
Re: creating DUN connection shortcut on desktop
|
NTDOC
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
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
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
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 874 anonymous users online.
|
|
|