Page 1 of 1 1
Topic Options
#9049 - 2001-05-30 09:15 PM shell fails on win95 boxes
Anonymous
Unregistered


I've had great success on win2000 desktops just calling executable with kx32.dll in same folder.

I'm trying to update some legacy windows 95 desktops.
kix script uses message box and then a few shell lines..
Message box comes up no problem..
Next lines use shell statement to execute
erase command and to execute an install for an app. These shell's work fine on win2000 desktops.

Win 95 script execution doesn't show errors
It doesn't stall, it only executes message box and drops out..

I've copied the kx*.dll's (kx95, kx16 & kx32 down into windows and windows\system

Top
#9050 - 2001-05-31 04:49 AM Re: shell fails on win95 boxes
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

Please put your script on the board.
Greetings.

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#9051 - 2001-05-31 06:59 PM Re: shell fails on win95 boxes
Anonymous
Unregistered


SetConsole("HIDE")
If Exist("c:\windows\profiles\%net_name%\desktop\Page Gate.lnk")
Shell "command /c echo @date,@time,@userid,@wksta,@ipaddress0,@address,PageGate 3.6 client setup not required >> \\amlars201\common\logs\pagegate\pgpoly.txt"
$user=@USERID
$name=@FULLNAME
$ipa=@IPADDRESS0
$msg=$name + Chr(10) + "The PageGate Client shortcut icon is on your desktop" + Chr(10) + "If PageGate is not functioning properly" + Chr(10) + "Contact Joe Smith, (***) ***-****"
MessageBox($msg, "PageGate Icon Update not Required", 64, 10)

Else

$user=@USERID
$name=@FULLNAME
$ipa=@ipaddress0
$msg=$name + Chr(10) + "The PageGate Client setup will now execute " + Chr(10) + "After installation completes, please run PageGate to verify connectivity" + Chr(10) + "If you need assistance" + Chr(10) + "Contact Joe Smith, (***) ***-****"
MessageBox($msg, "PageGate Icon Update", 64, 10)
;run "erase note pa*.* /s"'
;run "\\amlars406\apps\pagegate\client\setup\pgcsetup.exe /S"
;shell 'regedit /s n:\pagegate\pagegate.reg"'
shell 'command.com /c "echo @date,@time,@userid,@wksta,@ipaddress0,@address,PageGate 3.6 client setup executed >> c:\pgpoly.txt"'


endif

***************
I understand if my convenient variable values are now gone and I need to know how I can relate to the set variables in 95...
I switched to run and app will install
how can I use echo to txt file ..
tried
shell with the following...
command.com /c
%comspec% /c

[This message has been edited by pearsdb (edited 31 May 2001).]

Top
#9052 - 2001-06-01 01:01 PM Re: shell fails on win95 boxes
Alex.H Offline
Seasoned Scripter

Registered: 2001-04-10
Posts: 406
Loc: France
You'll have to use this :
code:

Select
case @INWIN=1 ; 1 for NTx , 2 for 9x/ME
$UserName=@WUSERID
case @INWIN=2
$UserName=@USERID
endselect


$username will have the %net_name% value you use (as far it seems to me that it's the logon user name)
Instead of this : c:\windows\profiles\%net_name%\desktop\Page Gate.lnk
i suggest this : "%windir%\profiles\"+ $username +"\desktop\Page Gate.lnk"
(%windir% will work on all Windows)

For Echo :
I use this and it work well :
SHELL "%comspec% /C ECHO " + $texttowrite +" >> c:\...\file.txt"

[This message has been edited by Popovk (edited 01 June 2001).]

_________________________
? getobject(Kixtart.org.Signature)

Top
#9053 - 2001-06-01 05:15 PM Re: shell fails on win95 boxes
Anonymous
Unregistered


Thanks, I've used %windir% both in kix and dos batch previously. I'll try your suggestion on shell statement ..
I've been trying pretty similar shell statements with no result so far on win95 boxes.


Top
#9054 - 2001-06-03 05:19 PM Re: shell fails on win95 boxes
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We look at your script and we have some advise.


  • use %comspec% instead of command call
  • use shell instead of run call when your script must
    wait on completion of this command.
  • IF (exist("filename") <> 0) is must clear then
    the usage of IF exist("filename").
  • %net_name% is for use an unknown environment variable. By profiles
    in a Windows 95 environment it will be the @userid value for existing
    profile of that user - c:\windows\profiles\@userid\desktop,
    or it will be the general desktop c:\windows[desktop.
  • use new string format of kixtart
    $message=@date+" "+@time
    instead of
    $message="@date @time"

The script can be:

code:

IF SetConsole("HIDE")
ENDIF
IF (Exist("c:\windows\profiles\"+@userid+"\desktop\Page Gate.lnk") <> 1) ; -shortcut doesn't exist-
$message=@date+" "+@time+" "+@userid+" "+@wksta+" "+@ipaddress0+" "+@address
SHELL "%comspec% /c echo "+$message+" PageGate 3.6 client setup not required >>\\amlars201\common\logs\pagegate\pgpoly.txt"
$user=@userid
$name=@fullname
$ipa=@ipaddress0
$msg=$name+Chr(10)+"The PageGate Client shortcut icon is on your desktop"+Chr(10)+"If PageGate is not functioning properly"+Chr(10)+"Contact Joe Smith, (***) ***-****"
MessageBox($msg, "PageGate Icon Update not Required", 64, 10)
ELSE
$user=@userid
$name=@fullname
$ipa=@ipaddress0
$msg=$name+Chr(10)+"The PageGate Client setup will now execute "+Chr(10)+"After installation completes, please run PageGate to verify connectivity"+Chr(10)+"If you need assistance"+Chr(10)+"Contact Joe Smith, (***) ***-****"
; shell "erase note pa*.* /s"
; shell "\\amlars406\apps\pagegate\client\setup\pgcsetup.exe /S"
; shell "regedit /s n:\pagegate\pagegate.reg"
MessageBox($msg, "PageGate Icon Update", 64, 10)
SHELL "%comspec% /c echo "+$message+" PageGate 3.6 client setup executed >>c:\pgpoly.txt"
ENDIF

Greetings.

------------------
Site map:

_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#9055 - 2001-06-05 01:42 AM Re: shell fails on win95 boxes
Anonymous
Unregistered


I really appreciate your time helping me with this script...
It now is working..
However.. kx32 hangs at end when system needs to restart once app has completed install..
I've tried run and shell for the app install and put quit and exit at the end of the script..
Thanks for all the great suggestions!

Top
#9056 - 2001-06-05 10:19 PM Re: shell fails on win95 boxes
bleonard Offline
Seasoned Scripter
*****

Registered: 2001-01-19
Posts: 581
Loc: Chicago, IL
pearsdb -
Try the syntax below for restarting a Win9x device. Additional info can be found under MS Tech Article Q234216.

Bill

SHELL "%comspec% /c rundll32.exe shell32.dll,SHExitWindowsEx 0"

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 764 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 Registered Users

Generated in 0.109 seconds in which 0.086 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